diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2022-01-24 10:41:55 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-02-15 17:14:24 -0300 |
commit | a48b96ca5a6572895b1f1c9f28e8de226a2c61a4 (patch) | |
tree | b25ab0016685e21ed26509370fe9d94cb31cc718 /tools/perf/builtin-script.c | |
parent | 5b11749b36499f917c9c3fa6e494cdd630ff456e (diff) | |
download | lwn-a48b96ca5a6572895b1f1c9f28e8de226a2c61a4.tar.gz lwn-a48b96ca5a6572895b1f1c9f28e8de226a2c61a4.zip |
perf script: Display Intel PT iflag synthesized event
Similar to other Intel PT synth events, display changes to the interrupt
flag represented by the MODE.Exec packet.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20220124084201.2699795-20-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 08e8ef5fcf83..517d5f7a7d39 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1848,6 +1848,19 @@ static int perf_sample__fprintf_synth_evt(struct perf_sample *sample, FILE *fp) return len + perf_sample__fprintf_pt_spacing(len, fp); } +static int perf_sample__fprintf_synth_iflag_chg(struct perf_sample *sample, FILE *fp) +{ + struct perf_synth_intel_iflag_chg *data = perf_sample__synth_ptr(sample); + int len; + + if (perf_sample__bad_synth_size(sample, *data)) + return 0; + + len = fprintf(fp, " IFLAG: %d->%d %s branch", !data->iflag, data->iflag, + data->via_branch ? "via" : "non"); + return len + perf_sample__fprintf_pt_spacing(len, fp); +} + static int perf_sample__fprintf_synth(struct perf_sample *sample, struct evsel *evsel, FILE *fp) { @@ -1868,6 +1881,8 @@ static int perf_sample__fprintf_synth(struct perf_sample *sample, return perf_sample__fprintf_synth_psb(sample, fp); case PERF_SYNTH_INTEL_EVT: return perf_sample__fprintf_synth_evt(sample, fp); + case PERF_SYNTH_INTEL_IFLAG_CHG: + return perf_sample__fprintf_synth_iflag_chg(sample, fp); default: break; } |