From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Don Zickus <dzickus@redhat.com>, Joe Mario <jmario@redhat.com>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Namhyung Kim <namhyung@kernel.org>,
David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key
Date: Tue, 4 Oct 2016 13:50:12 -0300 [thread overview]
Message-ID: <20161004165012.GH7143@kernel.org> (raw)
In-Reply-To: <1474558645-19956-21-git-send-email-jolsa@kernel.org>
Em Thu, Sep 22, 2016 at 05:36:48PM +0200, Jiri Olsa escreveu:
> Adding dcacheline dimension key support. It
> displays cacheline address as hex number.
>
> Using c2c wrapper to standard 'dcacheline' object
> to defined own header and simple (just address)
> cacheline output.
So, at this point I move from:
# perf c2c report
Error: Invalid --fields key: `dcacheline'
#
To:
[root@jouet ~]# perf c2c report
Error: Unknown --fields key: `offset'
Segmentation fault (core dumped)
[root@jouet ~]#
Error: Unknown --fields key: `offset'
Program received signal SIGSEGV, Segmentation fault.
0x0000000000524e1e in hist_entry__cmp (left=0x31a6590, right=0x7fffffffcf10) at util/hist.c:1071
1071 hists__for_each_sort_list(hists, fmt) {
Missing separate debuginfos, use: dnf debuginfo-install audit-libs-2.6.7-1.fc24.x86_64 bzip2-libs-1.0.6-20.fc24.x86_64 elfutils-libelf-0.167-1.fc24.x86_64 elfutils-libs-0.167-1.fc24.x86_64 libcap-ng-0.7.8-1.fc24.x86_64 libunwind-1.1-11.fc24.x86_64 numactl-libs-2.0.11-2.fc24.x86_64 openssl-libs-1.0.2j-1.fc24.x86_64 perl-libs-5.22.2-362.fc24.x86_64 python-libs-2.7.12-5.fc24.x86_64 slang-2.3.0-5.fc24.x86_64 xz-libs-5.2.2-2.fc24.x86_64 zlib-1.2.8-10.fc24.x86_64
(gdb) bt
#0 0x0000000000524e1e in hist_entry__cmp (left=0x31a6590, right=0x7fffffffcf10) at util/hist.c:1071
#1 0x00000000005238cf in hists__findnew_entry (hists=0x31a6230, entry=0x7fffffffcf10, al=0x7fffffffd160, sample_self=true) at util/hist.c:513
#2 0x0000000000523cc9 in __hists__add_entry (hists=0x31a6230, al=0x7fffffffd160, sym_parent=0x0, bi=0x0, mi=0x3497a10, sample=0x7fffffffd360,
sample_self=true, ops=0x96a530 <c2c_entry_ops>) at util/hist.c:604
#3 0x0000000000523dba in hists__add_entry_ops (hists=0x31a6230, ops=0x96a530 <c2c_entry_ops>, al=0x7fffffffd160, sym_parent=0x0, bi=0x0, mi=0x3497a10,
sample=0x7fffffffd360, sample_self=true) at util/hist.c:628
#4 0x0000000000464d1b in process_sample_event (tool=0x96a100 <c2c>, event=0x7ffff41be638, sample=0x7fffffffd360, evsel=0x2072b00, machine=0x2071c78)
at builtin-c2c.c:148
#5 0x00000000004fca6a in perf_evlist__deliver_sample (evlist=0x2071f30, tool=0x96a100 <c2c>, event=0x7ffff41be638, sample=0x7fffffffd360, evsel=0x2072b00,
machine=0x2071c78) at util/session.c:1196
#6 0x00000000004fcbfe in machines__deliver_event (machines=0x2071c78, evlist=0x2071f30, event=0x7ffff41be638, sample=0x7fffffffd360, tool=0x96a100 <c2c>,
file_offset=5256760) at util/session.c:1233
#7 0x00000000004fcf1c in perf_session__deliver_event (session=0x2071b90, event=0x7ffff41be638, sample=0x7fffffffd360, tool=0x96a100 <c2c>,
file_offset=5256760) at util/session.c:1290
#8 0x00000000004f9cad in ordered_events__deliver_event (oe=0x2071e90, event=0x3196098) at util/session.c:114
#9 0x0000000000500293 in __ordered_events__flush (oe=0x2071e90) at util/ordered-events.c:207
#10 0x0000000000500557 in ordered_events__flush (oe=0x2071e90, how=OE_FLUSH__ROUND) at util/ordered-events.c:274
#11 0x00000000004fbc12 in process_finished_round (tool=0x96a100 <c2c>, event=0x7ffff41c7bc0, oe=0x2071e90) at util/session.c:852
#12 0x00000000004fd0ba in perf_session__process_user_event (session=0x2071b90, event=0x7ffff41c7bc0, file_offset=5295040) at util/session.c:1329
#13 0x00000000004fd6e5 in perf_session__process_event (session=0x2071b90, event=0x7ffff41c7bc0, file_offset=5295040) at util/session.c:1455
#14 0x00000000004fe47c in __perf_session__process_events (session=0x2071b90, data_offset=424, data_size=5294624, file_size=5295048) at util/session.c:1824
#15 0x00000000004fe67a in perf_session__process_events (session=0x2071b90) at util/session.c:1878
#16 0x0000000000465d3b in perf_c2c__report (argc=0, argv=0x7fffffffe1d0) at builtin-c2c.c:617
#17 0x0000000000466535 in cmd_c2c (argc=1, argv=0x7fffffffe1d0, prefix=0x0) at builtin-c2c.c:755
#18 0x00000000004aa677 in run_builtin (p=0x975548 <commands+72>, argc=2, argv=0x7fffffffe1d0) at perf.c:358
#19 0x00000000004aa8e4 in handle_internal_command (argc=2, argv=0x7fffffffe1d0) at perf.c:420
#20 0x00000000004aaa29 in run_argv (argcp=0x7fffffffe02c, argv=0x7fffffffe020) at perf.c:466
#21 0x00000000004aae12 in main (argc=2, argv=0x7fffffffe1d0) at perf.c:610
(gdb)
> Link: http://lkml.kernel.org/n/tip-j5enppr8e7h27nskqhgq33lu@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/perf/builtin-c2c.c | 38 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index cfa12930b77b..335c0fd30757 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -1,5 +1,6 @@
> #include <linux/compiler.h>
> #include <linux/kernel.h>
> +#include <linux/stringify.h>
> #include "util.h"
> #include "debug.h"
> #include "builtin.h"
> @@ -7,6 +8,7 @@
> #include "mem-events.h"
> #include "session.h"
> #include "hist.h"
> +#include "sort.h"
> #include "tool.h"
> #include "data.h"
> #include "sort.h"
> @@ -271,6 +273,33 @@ static int c2c_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
> return scnprintf(hpp->buf, hpp->size, "%*s", width, text);
> }
>
> +static char *hex_str(u64 val)
> +{
> + static char buf[20];
> +
> + snprintf(buf, 20, "0x%" PRIx64, val);
> + return buf;
> +}
> +
> +static int64_t
> +dcacheline_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
> + struct hist_entry *left, struct hist_entry *right)
> +{
> + return sort__dcacheline_cmp(left, right);
> +}
> +
> +static int dcacheline_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
> + struct hist_entry *he)
> +{
> + uint64_t addr = 0;
> + int width = c2c_width(fmt, hpp, he->hists);
> +
> + if (he->mem_info)
> + addr = cl_address(he->mem_info->daddr.addr);
> +
> + return snprintf(hpp->buf, hpp->size, "%*s", width, hex_str(addr));
> +}
> +
> #define HEADER_LOW(__h) \
> { \
> .line[1] = { \
> @@ -306,7 +335,16 @@ static int c2c_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
> }, \
> }
>
> +static struct c2c_dimension dim_dcacheline = {
> + .header = HEADER_LOW("Cacheline"),
> + .name = "dcacheline",
> + .cmp = dcacheline_cmp,
> + .entry = dcacheline_entry,
> + .width = 18,
> +};
> +
> static struct c2c_dimension *dimensions[] = {
> + &dim_dcacheline,
> NULL,
> };
>
> --
> 2.7.4
next prev parent reply other threads:[~2016-10-04 16:50 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 15:36 [PATCHv4 00/57] perf c2c: Add new tool to analyze cacheline contention on NUMA systems Jiri Olsa
2016-09-22 15:36 ` [PATCH 01/57] perf tools: Add __hist_entry__snprintf function Jiri Olsa
2016-09-22 15:50 ` Arnaldo Carvalho de Melo
2016-09-23 5:28 ` [tip:perf/core] perf hists: " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 02/57] perf tools: Introduce c2c_decode_stats function Jiri Olsa
2016-10-22 8:31 ` [tip:perf/core] perf c2c: " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 03/57] perf tools: Introduce c2c_add_stats function Jiri Olsa
2016-10-22 8:31 ` [tip:perf/core] perf c2c: " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 04/57] perf tools: Make reset_dimensions global Jiri Olsa
2016-09-22 15:50 ` Arnaldo Carvalho de Melo
2016-09-23 5:29 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 05/57] perf tools: Make output_field_add and sort_dimension__add global Jiri Olsa
2016-09-22 15:50 ` Arnaldo Carvalho de Melo
2016-09-23 5:29 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 06/57] perf tools: Make several sorting functions global Jiri Olsa
2016-09-22 15:50 ` Arnaldo Carvalho de Melo
2016-09-23 5:29 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 07/57] perf tools: Make several display " Jiri Olsa
2016-09-22 15:50 ` Arnaldo Carvalho de Melo
2016-09-23 5:30 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 08/57] perf tools: Make __hist_entry__snprintf function global Jiri Olsa
2016-09-22 15:50 ` Arnaldo Carvalho de Melo
2016-09-23 5:30 ` [tip:perf/core] perf hists: " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 09/57] perf tools: Make hists__fprintf_headers " Jiri Olsa
2016-09-22 15:51 ` Arnaldo Carvalho de Melo
2016-09-23 5:31 ` [tip:perf/core] perf hists: " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 10/57] perf c2c: Add c2c command Jiri Olsa
2016-10-22 8:32 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 11/57] perf c2c: Add record subcommand Jiri Olsa
2016-10-22 8:32 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 12/57] perf c2c: Add report subcommand Jiri Olsa
2016-10-22 8:33 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 13/57] perf c2c report: Add dimension support Jiri Olsa
2016-10-22 8:33 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 14/57] perf c2c report: Add sort_entry " Jiri Olsa
2016-10-22 8:34 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 15/57] perf c2c report: Fallback to standard dimensions Jiri Olsa
2016-10-22 8:34 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 16/57] perf c2c report: Add sample processing Jiri Olsa
2016-10-22 8:35 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 17/57] perf c2c report: Add cacheline hists processing Jiri Olsa
2016-10-22 8:35 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 18/57] perf c2c report: Decode c2c_stats for hist entries Jiri Olsa
2016-10-22 8:36 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 19/57] perf c2c report: Add header macros Jiri Olsa
2016-10-22 8:36 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 20/57] perf c2c report: Add dcacheline dimension key Jiri Olsa
2016-10-04 16:50 ` Arnaldo Carvalho de Melo [this message]
2016-10-04 22:46 ` Jiri Olsa
2016-10-05 10:45 ` Arnaldo Carvalho de Melo
2016-10-05 10:50 ` Arnaldo Carvalho de Melo
2016-10-05 12:38 ` Jiri Olsa
2016-10-05 13:21 ` Arnaldo Carvalho de Melo
2016-10-05 11:01 ` Arnaldo Carvalho de Melo
2016-10-05 11:05 ` Arnaldo Carvalho de Melo
2016-10-05 12:45 ` Jiri Olsa
2016-10-05 13:09 ` Jiri Olsa
2016-10-05 13:26 ` Arnaldo Carvalho de Melo
2016-10-05 13:38 ` Jiri Olsa
2016-10-05 14:02 ` Jiri Olsa
2016-10-05 13:23 ` Arnaldo Carvalho de Melo
2016-10-22 8:37 ` [tip:perf/core] perf c2c report: Add 'dcacheline' " tip-bot for Jiri Olsa
2016-09-22 15:36 ` [PATCH 21/57] perf c2c report: Add offset " Jiri Olsa
2016-10-05 10:57 ` Arnaldo Carvalho de Melo
2016-10-05 12:11 ` Jiri Olsa
2016-09-22 15:36 ` [PATCH 22/57] perf c2c report: Add iaddr " Jiri Olsa
2016-09-22 15:36 ` [PATCH 23/57] perf c2c report: Add hitm related dimension keys Jiri Olsa
2016-09-22 15:36 ` [PATCH 24/57] perf c2c report: Add stores " Jiri Olsa
2016-09-22 15:36 ` [PATCH 25/57] perf c2c report: Add loads " Jiri Olsa
2016-09-22 15:36 ` [PATCH 26/57] perf c2c report: Add llc and remote " Jiri Olsa
2016-09-22 15:36 ` [PATCH 27/57] perf c2c report: Add llc load miss dimension key Jiri Olsa
2016-09-22 15:36 ` [PATCH 28/57] perf c2c report: Add total record sort key Jiri Olsa
2016-09-22 15:36 ` [PATCH 29/57] perf c2c report: Add total loads " Jiri Olsa
2016-09-22 15:36 ` [PATCH 30/57] perf c2c report: Add hitm percent " Jiri Olsa
2016-09-22 15:36 ` [PATCH 31/57] perf c2c report: Add hitm/store percent related sort keys Jiri Olsa
2016-09-22 15:37 ` [PATCH 32/57] perf c2c report: Add dram " Jiri Olsa
2016-09-22 15:37 ` [PATCH 33/57] perf c2c report: Add pid sort key Jiri Olsa
2016-09-22 15:37 ` [PATCH 34/57] perf c2c report: Add tid " Jiri Olsa
2016-09-22 15:37 ` [PATCH 35/57] perf c2c report: Add symbol and dso sort keys Jiri Olsa
2016-09-22 15:37 ` [PATCH 36/57] perf c2c report: Add node sort key Jiri Olsa
2016-09-22 15:37 ` [PATCH 37/57] perf c2c report: Add stats related sort keys Jiri Olsa
2016-09-22 15:37 ` [PATCH 38/57] perf c2c report: Add cpu cnt sort key Jiri Olsa
2016-09-22 15:37 ` [PATCH 39/57] perf c2c report: Add src line " Jiri Olsa
2016-10-10 16:47 ` Arnaldo Carvalho de Melo
2016-09-22 15:37 ` [PATCH 40/57] perf c2c report: Setup number of header lines for hists Jiri Olsa
2016-09-22 15:37 ` [PATCH 41/57] perf c2c report: Set final resort fields Jiri Olsa
2016-09-22 15:37 ` [PATCH 42/57] perf c2c report: Add stdio output support Jiri Olsa
2016-09-22 15:37 ` [PATCH 43/57] perf c2c report: Add main browser Jiri Olsa
2016-09-22 15:37 ` [PATCH 44/57] perf c2c report: Add cacheline browser Jiri Olsa
2016-09-22 15:37 ` [PATCH 45/57] perf c2c report: Add global stats stdio output Jiri Olsa
2016-09-22 15:37 ` [PATCH 46/57] perf c2c report: Add shared cachelines " Jiri Olsa
2016-09-22 15:37 ` [PATCH 47/57] perf c2c report: Add c2c related " Jiri Olsa
2016-09-22 15:37 ` [PATCH 48/57] perf c2c report: Allow to report callchains Jiri Olsa
2016-09-22 15:37 ` [PATCH 49/57] perf c2c report: Limit the cachelines table entries Jiri Olsa
2016-10-10 20:01 ` Arnaldo Carvalho de Melo
2016-10-11 9:22 ` Jiri Olsa
2016-09-22 15:37 ` [PATCH 50/57] perf c2c report: Add support to choose local HITMs Jiri Olsa
2016-09-22 15:37 ` [PATCH 51/57] perf c2c report: Allow to set cacheline sort fields Jiri Olsa
2016-09-22 15:37 ` [PATCH 52/57] perf c2c report: Recalc width of global sort entries Jiri Olsa
2016-09-22 15:37 ` [PATCH 53/57] perf c2c report: Add cacheline index entry Jiri Olsa
2016-09-22 15:37 ` [PATCH 54/57] perf c2c report: Add support to manage symbol name length Jiri Olsa
2016-09-22 15:37 ` [PATCH 55/57] perf c2c report: Iterate node display in browser Jiri Olsa
2016-09-22 15:37 ` [PATCH 56/57] perf c2c report: Add help windows Jiri Olsa
2016-09-22 15:37 ` [PATCH 57/57] perf c2c: Add man page and credits Jiri Olsa
2016-09-29 9:19 ` [PATCHv4 00/57] perf c2c: Add new tool to analyze cacheline contention on NUMA systems Peter Zijlstra
2016-09-29 14:54 ` Arnaldo Carvalho de Melo
2016-10-01 13:44 ` Joe Mario
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161004165012.GH7143@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=dzickus@redhat.com \
--cc=jmario@redhat.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).