diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-08-12 06:16:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-08-12 06:16:11 -0400 |
commit | 5f1230c9b80b89f404938ff88dfa64a963f74f2c (patch) | |
tree | f829a0246125b517443de57b883bc663aad82d9d /tools/perf/util/hist.c | |
parent | 709bc871923c12b284424f9d47b99dc975ba8b29 (diff) | |
parent | 4605bb55b91449a1a953a51f0334d3bc02351adb (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Introduce 'srcfile' sort key: (Andi Kleen)
# perf record -F 10000 usleep 1
# perf report --stdio --dsos '[kernel.vmlinux]' -s srcfile
<SNIP>
# Overhead Source File
26.49% copy_page_64.S
5.49% signal.c
0.51% msr.h
#
It can be combined with other fields, for instance, experiment with
'-s srcfile,symbol'.
There are some oddities in some distros and with some specific DSOs, being
investigated, so your mileage may vary.
- Update the column width for the "srcline" sort key (Arnaldo Carvalho de Melo)
- Support per-event 'freq' term: (Namhyung Kim)
$ perf record -e 'cpu/instructions,freq=1234/',cycles -c 1000 sleep 1
$ perf evlist -F
cpu/instructions,freq=1234/: sample_freq=1234
cycles: sample_period=1000
$
Infrastructure changes:
- Move perf_counts struct and functions into separate object (Jiri Olsa)
- Unset perf_event_attr::freq when period term is set (Jiri Olsa)
- Move callchain option parsing code to util.c (Kan Liang)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index a6e9ddd37913..6bccfae334b1 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -151,6 +151,12 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h) | |||
151 | hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12); | 151 | hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12); |
152 | hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12); | 152 | hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12); |
153 | 153 | ||
154 | if (h->srcline) | ||
155 | hists__new_col_len(hists, HISTC_SRCLINE, strlen(h->srcline)); | ||
156 | |||
157 | if (h->srcfile) | ||
158 | hists__new_col_len(hists, HISTC_SRCFILE, strlen(h->srcfile)); | ||
159 | |||
154 | if (h->transaction) | 160 | if (h->transaction) |
155 | hists__new_col_len(hists, HISTC_TRANSACTION, | 161 | hists__new_col_len(hists, HISTC_TRANSACTION, |
156 | hist_entry__transaction_len()); | 162 | hist_entry__transaction_len()); |
@@ -761,6 +767,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter, | |||
761 | struct hist_entry **he_cache = iter->priv; | 767 | struct hist_entry **he_cache = iter->priv; |
762 | struct hist_entry *he; | 768 | struct hist_entry *he; |
763 | struct hist_entry he_tmp = { | 769 | struct hist_entry he_tmp = { |
770 | .hists = evsel__hists(evsel), | ||
764 | .cpu = al->cpu, | 771 | .cpu = al->cpu, |
765 | .thread = al->thread, | 772 | .thread = al->thread, |
766 | .comm = thread__comm(al->thread), | 773 | .comm = thread__comm(al->thread), |
@@ -945,6 +952,8 @@ void hist_entry__delete(struct hist_entry *he) | |||
945 | 952 | ||
946 | zfree(&he->stat_acc); | 953 | zfree(&he->stat_acc); |
947 | free_srcline(he->srcline); | 954 | free_srcline(he->srcline); |
955 | if (he->srcfile && he->srcfile[0]) | ||
956 | free(he->srcfile); | ||
948 | free_callchain(he->callchain); | 957 | free_callchain(he->callchain); |
949 | free(he); | 958 | free(he); |
950 | } | 959 | } |