diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-12 21:20:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-12 21:20:11 -0400 |
commit | ade0899b298ba2c43bfd6abd8cbc2545944cde0c (patch) | |
tree | a448dfb440b3b958b6306bb43620cd5d76f504bf /tools/perf/ui/browsers/hists.c | |
parent | 871a0596cb2f51b57dc583d1a7c4be0186582fe7 (diff) | |
parent | 95cf59ea72331d0093010543b8951bb43f262cac (diff) |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar:
"This tree includes some late late perf items that missed the first
round:
tools:
- Bash auto completion improvements, now we can auto complete the
tools long options, tracepoint event names, etc, from Namhyung Kim.
- Look up thread using tid instead of pid in 'perf sched'.
- Move global variables into a perf_kvm struct, from David Ahern.
- Hists refactorings, preparatory for improved 'diff' command, from
Jiri Olsa.
- Hists refactorings, preparatory for event group viewieng work, from
Namhyung Kim.
- Remove double negation on optional feature macro definitions, from
Namhyung Kim.
- Remove several cases of needless global variables, on most
builtins.
- misc fixes
kernel:
- sysfs support for IBS on AMD CPUs, from Robert Richter.
- Support for an upcoming Intel CPU, the Xeon-Phi / Knights Corner
HPC blade PMU, from Vince Weaver.
- misc fixes"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
perf: Fix perf_cgroup_switch for sw-events
perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu
perf/AMD/IBS: Add sysfs support
perf hists: Add more helpers for hist entry stat
perf hists: Move he->stat.nr_events initialization to a template
perf hists: Introduce struct he_stat
perf diff: Removing the total_period argument from output code
perf tool: Add hpp interface to enable/disable hpp column
perf tools: Removing hists pair argument from output path
perf hists: Separate overhead and baseline columns
perf diff: Refactor diff displacement possition info
perf hists: Add struct hists pointer to struct hist_entry
perf tools: Complete tracepoint event names
perf/x86: Add support for Intel Xeon-Phi Knights Corner PMU
perf evlist: Remove some unused methods
perf evlist: Introduce add_newtp method
perf kvm: Move global variables into a perf_kvm struct
perf tools: Convert to BACKTRACE_SUPPORT
perf tools: Long option completion support for each subcommands
perf tools: Complete long option names of perf command
...
Diffstat (limited to 'tools/perf/ui/browsers/hists.c')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index a21f40bebbac..0568536ecf67 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -569,7 +569,8 @@ static int hist_browser__show_callchain(struct hist_browser *browser, | |||
569 | static int hist_browser__hpp_color_ ## _name(struct perf_hpp *hpp, \ | 569 | static int hist_browser__hpp_color_ ## _name(struct perf_hpp *hpp, \ |
570 | struct hist_entry *he) \ | 570 | struct hist_entry *he) \ |
571 | { \ | 571 | { \ |
572 | double percent = 100.0 * he->_field / hpp->total_period; \ | 572 | struct hists *hists = he->hists; \ |
573 | double percent = 100.0 * he->stat._field / hists->stats.total_period; \ | ||
573 | *(double *)hpp->ptr = percent; \ | 574 | *(double *)hpp->ptr = percent; \ |
574 | return scnprintf(hpp->buf, hpp->size, "%6.2f%%", percent); \ | 575 | return scnprintf(hpp->buf, hpp->size, "%6.2f%%", percent); \ |
575 | } | 576 | } |
@@ -584,7 +585,7 @@ HPP__COLOR_FN(overhead_guest_us, period_guest_us) | |||
584 | 585 | ||
585 | void hist_browser__init_hpp(void) | 586 | void hist_browser__init_hpp(void) |
586 | { | 587 | { |
587 | perf_hpp__init(false, false); | 588 | perf_hpp__init(); |
588 | 589 | ||
589 | perf_hpp__format[PERF_HPP__OVERHEAD].color = | 590 | perf_hpp__format[PERF_HPP__OVERHEAD].color = |
590 | hist_browser__hpp_color_overhead; | 591 | hist_browser__hpp_color_overhead; |
@@ -624,7 +625,6 @@ static int hist_browser__show_entry(struct hist_browser *browser, | |||
624 | struct perf_hpp hpp = { | 625 | struct perf_hpp hpp = { |
625 | .buf = s, | 626 | .buf = s, |
626 | .size = sizeof(s), | 627 | .size = sizeof(s), |
627 | .total_period = browser->hists->stats.total_period, | ||
628 | }; | 628 | }; |
629 | 629 | ||
630 | ui_browser__gotorc(&browser->b, row, 0); | 630 | ui_browser__gotorc(&browser->b, row, 0); |
@@ -982,7 +982,7 @@ static int hist_browser__fprintf_entry(struct hist_browser *browser, | |||
982 | folded_sign = hist_entry__folded(he); | 982 | folded_sign = hist_entry__folded(he); |
983 | 983 | ||
984 | hist_entry__sort_snprintf(he, s, sizeof(s), browser->hists); | 984 | hist_entry__sort_snprintf(he, s, sizeof(s), browser->hists); |
985 | percent = (he->period * 100.0) / browser->hists->stats.total_period; | 985 | percent = (he->stat.period * 100.0) / browser->hists->stats.total_period; |
986 | 986 | ||
987 | if (symbol_conf.use_callchain) | 987 | if (symbol_conf.use_callchain) |
988 | printed += fprintf(fp, "%c ", folded_sign); | 988 | printed += fprintf(fp, "%c ", folded_sign); |
@@ -990,10 +990,10 @@ static int hist_browser__fprintf_entry(struct hist_browser *browser, | |||
990 | printed += fprintf(fp, " %5.2f%%", percent); | 990 | printed += fprintf(fp, " %5.2f%%", percent); |
991 | 991 | ||
992 | if (symbol_conf.show_nr_samples) | 992 | if (symbol_conf.show_nr_samples) |
993 | printed += fprintf(fp, " %11u", he->nr_events); | 993 | printed += fprintf(fp, " %11u", he->stat.nr_events); |
994 | 994 | ||
995 | if (symbol_conf.show_total_period) | 995 | if (symbol_conf.show_total_period) |
996 | printed += fprintf(fp, " %12" PRIu64, he->period); | 996 | printed += fprintf(fp, " %12" PRIu64, he->stat.period); |
997 | 997 | ||
998 | printed += fprintf(fp, "%s\n", rtrim(s)); | 998 | printed += fprintf(fp, "%s\n", rtrim(s)); |
999 | 999 | ||