diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-16 17:06:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-16 17:06:21 -0700 |
commit | 772c1d06bd402f7ee72c61a18c2db74cd74b6758 (patch) | |
tree | e362fc7e158b3580d810a26189ecf91ec8a4f141 /tools/perf/builtin-timechart.c | |
parent | c7eba51cfdf9cd1ca7ed4201b30be8b2bef15ff5 (diff) | |
parent | e336b4027775cb458dc713745e526fa1a1996b2a (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar:
"Kernel side changes:
- Improved kbprobes robustness
- Intel PEBS support for PT hardware tracing
- Other Intel PT improvements: high order pages memory footprint
reduction and various related cleanups
- Misc cleanups
The perf tooling side has been very busy in this cycle, with over 300
commits. This is an incomplete high-level summary of the many
improvements done by over 30 developers:
- Lots of updates to the following tools:
'perf c2c'
'perf config'
'perf record'
'perf report'
'perf script'
'perf test'
'perf top'
'perf trace'
- Updates to libperf and libtraceevent, and a consolidation of the
proliferation of x86 instruction decoder libraries.
- Vendor event updates for Intel and PowerPC CPUs,
- Updates to hardware tracing tooling for ARM and Intel CPUs,
- ... and lots of other changes and cleanups - see the shortlog and
Git log for details"
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (322 commits)
kprobes: Prohibit probing on BUG() and WARN() address
perf/x86: Make more stuff static
x86, perf: Fix the dependency of the x86 insn decoder selftest
objtool: Ignore intentional differences for the x86 insn decoder
objtool: Update sync-check.sh from perf's check-headers.sh
perf build: Ignore intentional differences for the x86 insn decoder
perf intel-pt: Use shared x86 insn decoder
perf intel-pt: Remove inat.c from build dependency list
perf: Update .gitignore file
objtool: Move x86 insn decoder to a common location
perf metricgroup: Support multiple events for metricgroup
perf metricgroup: Scale the metric result
perf pmu: Change convert_scale from static to global
perf symbols: Move mem_info and branch_info out of symbol.h
perf auxtrace: Uninline functions that touch perf_session
perf tools: Remove needless evlist.h include directives
perf tools: Remove needless evlist.h include directives
perf tools: Remove needless thread_map.h include directives
perf tools: Remove needless thread.h include directives
perf tools: Remove needless map.h include directives
...
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r-- | tools/perf/builtin-timechart.c | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 4bde3fa245d1..e0e822695a29 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -10,13 +10,11 @@ #include <errno.h> #include <inttypes.h> -#include <traceevent/event-parse.h> #include "builtin.h" #include "util/color.h" #include <linux/list.h> -#include "util/cache.h" -#include "util/evlist.h" +#include "util/evlist.h" // for struct evsel_str_handler #include "util/evsel.h" #include <linux/kernel.h> #include <linux/rbtree.h> @@ -28,6 +26,7 @@ #include "perf.h" #include "util/header.h" +#include <subcmd/pager.h> #include <subcmd/parse-options.h> #include "util/parse-events.h" #include "util/event.h" @@ -545,19 +544,19 @@ exit: } typedef int (*tracepoint_handler)(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, const char *backtrace); static int process_sample_event(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, - struct perf_evsel *evsel, + struct evsel *evsel, struct machine *machine) { struct timechart *tchart = container_of(tool, struct timechart, tool); - if (evsel->attr.sample_type & PERF_SAMPLE_TIME) { + if (evsel->core.attr.sample_type & PERF_SAMPLE_TIME) { if (!tchart->first_time || tchart->first_time > sample->time) tchart->first_time = sample->time; if (tchart->last_time < sample->time) @@ -575,7 +574,7 @@ static int process_sample_event(struct perf_tool *tool, static int process_sample_cpu_idle(struct timechart *tchart __maybe_unused, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, const char *backtrace __maybe_unused) { @@ -591,7 +590,7 @@ process_sample_cpu_idle(struct timechart *tchart __maybe_unused, static int process_sample_cpu_frequency(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, const char *backtrace __maybe_unused) { @@ -604,7 +603,7 @@ process_sample_cpu_frequency(struct timechart *tchart, static int process_sample_sched_wakeup(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, const char *backtrace) { @@ -618,7 +617,7 @@ process_sample_sched_wakeup(struct timechart *tchart, static int process_sample_sched_switch(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, const char *backtrace) { @@ -634,7 +633,7 @@ process_sample_sched_switch(struct timechart *tchart, #ifdef SUPPORT_OLD_POWER_EVENTS static int process_sample_power_start(struct timechart *tchart __maybe_unused, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, const char *backtrace __maybe_unused) { @@ -647,7 +646,7 @@ process_sample_power_start(struct timechart *tchart __maybe_unused, static int process_sample_power_end(struct timechart *tchart, - struct perf_evsel *evsel __maybe_unused, + struct evsel *evsel __maybe_unused, struct perf_sample *sample, const char *backtrace __maybe_unused) { @@ -657,7 +656,7 @@ process_sample_power_end(struct timechart *tchart, static int process_sample_power_frequency(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, const char *backtrace __maybe_unused) { @@ -840,7 +839,7 @@ static int pid_end_io_sample(struct timechart *tchart, int pid, int type, static int process_enter_read(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long fd = perf_evsel__intval(evsel, sample, "fd"); @@ -850,7 +849,7 @@ process_enter_read(struct timechart *tchart, static int process_exit_read(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long ret = perf_evsel__intval(evsel, sample, "ret"); @@ -860,7 +859,7 @@ process_exit_read(struct timechart *tchart, static int process_enter_write(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long fd = perf_evsel__intval(evsel, sample, "fd"); @@ -870,7 +869,7 @@ process_enter_write(struct timechart *tchart, static int process_exit_write(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long ret = perf_evsel__intval(evsel, sample, "ret"); @@ -880,7 +879,7 @@ process_exit_write(struct timechart *tchart, static int process_enter_sync(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long fd = perf_evsel__intval(evsel, sample, "fd"); @@ -890,7 +889,7 @@ process_enter_sync(struct timechart *tchart, static int process_exit_sync(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long ret = perf_evsel__intval(evsel, sample, "ret"); @@ -900,7 +899,7 @@ process_exit_sync(struct timechart *tchart, static int process_enter_tx(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long fd = perf_evsel__intval(evsel, sample, "fd"); @@ -910,7 +909,7 @@ process_enter_tx(struct timechart *tchart, static int process_exit_tx(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long ret = perf_evsel__intval(evsel, sample, "ret"); @@ -920,7 +919,7 @@ process_exit_tx(struct timechart *tchart, static int process_enter_rx(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long fd = perf_evsel__intval(evsel, sample, "fd"); @@ -930,7 +929,7 @@ process_enter_rx(struct timechart *tchart, static int process_exit_rx(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long ret = perf_evsel__intval(evsel, sample, "ret"); @@ -940,7 +939,7 @@ process_exit_rx(struct timechart *tchart, static int process_enter_poll(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long fd = perf_evsel__intval(evsel, sample, "fd"); @@ -950,7 +949,7 @@ process_enter_poll(struct timechart *tchart, static int process_exit_poll(struct timechart *tchart, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample) { long ret = perf_evsel__intval(evsel, sample, "ret"); @@ -1518,10 +1517,7 @@ static int process_header(struct perf_file_section *section __maybe_unused, if (!tchart->topology) break; - if (svg_build_topology_map(ph->env.sibling_cores, - ph->env.nr_sibling_cores, - ph->env.sibling_threads, - ph->env.nr_sibling_threads)) + if (svg_build_topology_map(&ph->env)) fprintf(stderr, "problem building topology\n"); break; @@ -1534,7 +1530,7 @@ static int process_header(struct perf_file_section *section __maybe_unused, static int __cmd_timechart(struct timechart *tchart, const char *output_name) { - const struct perf_evsel_str_handler power_tracepoints[] = { + const struct evsel_str_handler power_tracepoints[] = { { "power:cpu_idle", process_sample_cpu_idle }, { "power:cpu_frequency", process_sample_cpu_frequency }, { "sched:sched_wakeup", process_sample_sched_wakeup }, |