From: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: "linux-perf-use." <linux-perf-users@vger.kernel.org>
Subject: Re: perf report does not resolve symbols on s390x
Date: Thu, 6 Jul 2017 09:23:05 +0200 [thread overview]
Message-ID: <7cb7a888-cb18-cbe3-f08b-39b4d062db36@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170705155007.GH27350@kernel.org>
On 07/05/2017 05:50 PM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jul 05, 2017 at 04:45:49PM +0200, Thomas-Mich Richter escreveu:
>> I use linux 4.12 kernel and the perf report --stdio does not resolve all symbols:
>> Only very few symbols are resolved and none listed in the call back chain.
>>
>> Here is an example:
>>
>> 50.00% 50.00% true [kernel.vmlinux] [k] __rb_insert_augmented
>> |
>> ---0x6a0624
>> 0x2d7c00
>> 0x2d79c8
>> 0x2b5a26
>> 0x2da542
>> 0x2da01a
>> 0x2d6c2e
>> 0x2d6b86
>>
>> 50.00% 0.00% true [unknown] [k] 0x000000000011e90a
>> |
>> ---0x11e90a
>> 0x2d39a4
>> 0x2d3238
>> 0x288140
>> 0x2cf404
>> 0x2df5d8
>> 0x31618c
>> 0x19b0ae
>>
>> These addresses are all in the /proc/kallsyms and valid.
>>
>> When I do a perf script it works:
>> [root@s8360046 perf]# perf script
>
> This is the strange part, 'script' resolving things 'report' doesn't,
> they should be using the same machinery... Since the DSO is not being
> resolved on the one failing above, this would look like its some
> PERF_RECORD_MMAP/PERF_RECORD_MMAP2 that is being missed, so you should
> look at the processing of such records, which is done via:
>
> perf_tool.mmap() and perf_tool.mmap2()
>
> the perf_tool ops table is passed to:
>
> perf_session__new(&file, false, &report.tool);
>
> Which will call the mmap() and mmap2() functions to process those
> records, if you look at script it has:
>
>
> struct perf_script script = {
> .tool = {
> .sample = process_sample_event,
> .mmap = perf_event__process_mmap,
> .mmap2 = perf_event__process_mmap2,
> <SNIP>
>
> and then:
>
> session = perf_session__new(&file, false, &script.tool);
>
> Which is the same as done for report:
>
> struct report report = {
> .tool = {
> .sample = process_sample_event,
> .mmap = perf_event__process_mmap,
> .mmap2 = perf_event__process_mmap2,
> <SNIP>
>
> perf_session__new(&file, false, &report.tool);
>
> I.e. both use the same functions to resolve PERF_RECORD_MMAP/MMAP2 records,
> then you should look at how samples are processed, its static functions, tool specific
> functions, both named process_sample_event, in tools/perf/builtin->{report,script}.c,
> and both will basically do:
>
> if (machine__resolve(machine, &al, sample) < 0) {
> pr_debug("problem processing %d event, skipping it.\n",
> event->header.type);
> return -1;
> }
>
> That will do lookups on trees populated by perf_event__process_mmap,
> perf_event__process_mmap2, and the routines handling PERF_RECORD_FORK, etc.
>
> Is this enough to help you go from here to investigate your problem?
>
> - Arnaldo
>
Thanks a lot for the direction to dig into. I am quiet new to perf and still
do not have an understanding of all the structures and how their interact together.
Maybe there is some documentation of the internals of perf someone can share with
me? Or post it to the mailing list.
Thanks.
--
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
next prev parent reply other threads:[~2017-07-06 7:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 14:45 perf report does not resolve symbols on s390x Thomas-Mich Richter
2017-07-05 15:50 ` Arnaldo Carvalho de Melo
2017-07-06 7:23 ` Thomas-Mich Richter [this message]
2017-07-06 12:35 ` Thomas-Mich Richter
2017-07-07 12:17 ` Thomas-Mich Richter
2017-07-07 12:22 ` Arnaldo Carvalho de Melo
2017-07-11 19:03 ` Arnaldo Carvalho de Melo
2017-07-11 19:38 ` Arnaldo Carvalho de Melo
2017-07-11 19:48 ` Arnaldo Carvalho de Melo
2017-07-12 8:21 ` Thomas-Mich Richter
2017-07-12 10:40 ` Michael Ellerman
2017-07-12 14:04 ` Arnaldo Carvalho de Melo
2017-07-13 12:02 ` Michael Ellerman
2017-07-12 9:05 ` Thomas-Mich Richter
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=7cb7a888-cb18-cbe3-f08b-39b4d062db36@linux.vnet.ibm.com \
--to=tmricht@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=linux-perf-users@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 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).