From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>,
jolsa@kernel.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] perf, script: Fix crash with printing mixed trace point and other events
Date: Fri, 18 Jan 2019 10:01:06 -0300 [thread overview]
Message-ID: <20190118130106.GH5823@kernel.org> (raw)
In-Reply-To: <20190118125920.GG5823@kernel.org>
Em Fri, Jan 18, 2019 at 09:59:20AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Jan 18, 2019 at 10:49:19AM +0100, Jiri Olsa escreveu:
> > On Thu, Jan 17, 2019 at 11:48:34AM -0800, Andi Kleen wrote:
> > > From: Andi Kleen <ak@linux.intel.com>
>
> > > perf script crashes currently when printing mixed trace points and other
> > > events because the trace format does not handle events without trace
> > > meta data. Add a simple check to avoid that.
>
> > > % cat > test.c
> > > main()
> > > {
> > > printf("Hello world\n");
> > > }
> > > ^D
> > > % gcc -g -o test test.c
> > > % sudo perf probe -x test 'test.c:3'
> > > % perf record -e '{cpu/cpu-cycles,period=10000/,probe_test:main}:S' ./test
> > > % perf script
> > > <segfault>
>
> > > Signed-off-by: Andi Kleen <ak@linux.intel.com>
>
> > Acked-by: Jiri Olsa <jolsa@kernel.org>
>
> Thanks, tested and applied.
>
> While testing I found something odd, the cycles events are not showing
> the CPU and the probe events shows a "negative" CPU column,
> investigating.
The sample_type for those two events:
[root@quaco wb]# perf evlist -v
cpu/cpu-cycles,period=10000/: type: 4, size: 112, config: 0x3c, { sample_period, sample_freq }: 10000, sample_type: IP|TID|TIME|READ|IDENTIFIER, read_format: ID|GROUP, disabled: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
probe_libc:malloc: type: 2, size: 112, config: 0x790, sample_type: IP|TID|TIME|READ|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID|GROUP, sample_id_all: 1, exclude_guest: 1
# Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events
[root@quaco wb]#
- Arnaldo
next prev parent reply other threads:[~2019-01-18 13:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 19:48 [PATCH] perf, script: Fix crash with printing mixed trace point and other events Andi Kleen
2019-01-18 9:49 ` Jiri Olsa
2019-01-18 12:59 ` Arnaldo Carvalho de Melo
2019-01-18 13:01 ` Arnaldo Carvalho de Melo [this message]
2019-01-18 13:42 ` [RFC] Don't print sample_type bits in non-group events not set in the group's was " Arnaldo Carvalho de Melo
2019-01-18 16:10 ` Jiri Olsa
2019-01-18 16:11 ` Andi Kleen
2019-01-18 16:17 ` Jiri Olsa
2019-01-19 15:37 ` Jiri Olsa
2019-01-28 14:13 ` Jiri Olsa
2019-01-28 17:00 ` Andi Kleen
2019-01-29 8:48 ` Arnaldo Carvalho de Melo
2019-01-29 9:04 ` Jiri Olsa
2019-01-22 11:34 ` [tip:perf/urgent] perf " tip-bot for Andi Kleen
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=20190118130106.GH5823@kernel.org \
--to=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.