Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
a48b96ca 5b11749b

+15
+15
tools/perf/builtin-script.c
··· 1848 1848 return len + perf_sample__fprintf_pt_spacing(len, fp); 1849 1849 } 1850 1850 1851 + static int perf_sample__fprintf_synth_iflag_chg(struct perf_sample *sample, FILE *fp) 1852 + { 1853 + struct perf_synth_intel_iflag_chg *data = perf_sample__synth_ptr(sample); 1854 + int len; 1855 + 1856 + if (perf_sample__bad_synth_size(sample, *data)) 1857 + return 0; 1858 + 1859 + len = fprintf(fp, " IFLAG: %d->%d %s branch", !data->iflag, data->iflag, 1860 + data->via_branch ? "via" : "non"); 1861 + return len + perf_sample__fprintf_pt_spacing(len, fp); 1862 + } 1863 + 1851 1864 static int perf_sample__fprintf_synth(struct perf_sample *sample, 1852 1865 struct evsel *evsel, FILE *fp) 1853 1866 { ··· 1881 1868 return perf_sample__fprintf_synth_psb(sample, fp); 1882 1869 case PERF_SYNTH_INTEL_EVT: 1883 1870 return perf_sample__fprintf_synth_evt(sample, fp); 1871 + case PERF_SYNTH_INTEL_IFLAG_CHG: 1872 + return perf_sample__fprintf_synth_iflag_chg(sample, fp); 1884 1873 default: 1885 1874 break; 1886 1875 }