mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Will Hawkins <whh8b@virginia.edu>
Cc: LKML <linux-kernel@vger.kernel.org>, Namhyung Kim <namhyung@gmail.com>
Subject: Re: Ftrace vs perf user page fault statistics differences
Date: Wed, 14 Jun 2017 16:01:20 -0400	[thread overview]
Message-ID: <20170614160120.577a6385@gandalf.local.home> (raw)
In-Reply-To: <CAE+MWFvA-VEDFnPSCS9y+kAH=SXQJnfhqYB+oxfp2FFJccdfUg@mail.gmail.com>

On Wed, 14 Jun 2017 13:47:17 -0400
Will Hawkins <whh8b@virginia.edu> wrote:


> > That's how trace-cmd parses it.  
> 
> In the kernel version that I am running (again, pretty old) I do not
> have this file. I do, however, have

It may be due to the kernel version. It gets the functions
from /proc/kallsyms. That could have have an issue. Although, I have
this too:

# grep per_cpu_start /proc/kallsyms 
0000000000000000 A __per_cpu_start

But I don't see it being converted in my report.

Hmm, it's not saved. Interesting:

 trace-cmd report -f

to see the list of saved functions. I need to figure out why it does
for you, but not for me.

> 
> /sys/kernel/debug/tracing/events/exceptions/page_fault_user/format
> 
> and the contents are:
> 
> name: page_fault_user
> ID: 79
> format:
>     field:unsigned short common_type;    offset:0;    size:2;    signed:0;
>     field:unsigned char common_flags;    offset:2;    size:1;    signed:0;
>     field:unsigned char common_preempt_count;    offset:3;    size:1;signed:0;
>     field:int common_pid;    offset:4;    size:4;    signed:1;
> 
>     field:unsigned long address;    offset:8;    size:8;    signed:0;
>     field:unsigned long ip;    offset:16;    size:8;    signed:0;
>     field:unsigned long error_code;    offset:24;    size:8;    signed:0;
> 
> print fmt: "address=%pf ip=%pf error_code=0x%lx", (void
> *)REC->address, (void *)REC->ip, REC->error_code
> 
> Again, this looks like exactly what I would expect since address has
> the cr2 value in that function. Plus, we know that the raw value is
> correct. I suppose that the "symbolification" of that value is done in
> trace-cmd, right? So, perhaps that is where I should start looking for
> the problem?
> 
> I definitely want to follow up on this and help where I can. That
> said, I think I am satisfied with "our" (really, your) answer to the
> original problem.

It has something to do with the reading of the function names
in /proc/kallsyms.

Ah, I bet it's a change in the kernel. A recent update to trace-cmd was
to ignore functions in kallsyms of type "A" (which you can see is what
I have above).

What do you have when you do:

 sudo grep per_cpu_start /proc/kallsyms

May or may not need sudo depending on if the kernel lets non root have
access to kallsyms.


-- Steve

  reply	other threads:[~2017-06-14 20:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 20:08 Will Hawkins
     [not found] ` <CAE+MWFuvAtGc0boe3arhnyoVpCpJBOsBTpk8W7Lh6r5PFE-Hmg@mail.gmail.com>
2017-06-13  1:20   ` Steven Rostedt
2017-06-13  2:05     ` Will Hawkins
2017-06-13 13:06       ` Steven Rostedt
2017-06-13 18:02         ` Will Hawkins
2017-06-13 20:04           ` Steven Rostedt
2017-06-14  1:27             ` Will Hawkins
2017-06-14  2:13               ` Steven Rostedt
2017-06-14 17:47                 ` Will Hawkins
2017-06-14 20:01                   ` Steven Rostedt [this message]
2017-06-19 17:13                     ` Will Hawkins
2017-06-19 18:52                       ` Steven Rostedt
2017-06-14  3:04             ` Namhyung Kim
2017-06-14 17:30               ` Will Hawkins
2017-06-14 17:43                 ` Steven Rostedt

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=20170614160120.577a6385@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=whh8b@virginia.edu \
    /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

all inboxes | Powered by JetHome®