lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: tracing page_faults with lttng?
Date: Mon, 29 May 2017 10:44:50 +0200	[thread overview]
Message-ID: <2312247.5OrstNElbn__15480.977544985$1496047911$gmane$org@milian-kdab2> (raw)
In-Reply-To: <CADcCL0i-gZHviy_QZq_Krj_2zXiYvF-Z8BLu-3uQyA0anBfO-g@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4265 bytes --]

On Wednesday, May 24, 2017 6:26:38 PM CEST Francis Deslauriers wrote:
> Hi Milian,
> Are you running on an x86 processor?

Yes, Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz.

> The pagefault tracepoints are called : x86_exceptions_page_fault_user,
> x86_exceptions_page_fault_kernel
> Can you see those tracepoints when you run: lttng list --kernel

Yes:

$ lttng list --kernel | grep fault
      x86_exceptions_page_fault_user (loglevel: TRACE_EMERG (0)) (type: 
tracepoint)
      x86_exceptions_page_fault_kernel (loglevel: TRACE_EMERG (0)) (type: 
tracepoint)
      kvm_async_pf_doublefault (loglevel: TRACE_EMERG (0)) (type: tracepoint)

I just reran my test and this time I only selectively enabled the fault 
tracepoints. This worked. Maybe my other test was triggering too many events, 
leading to the fault events being discarded. I only looked at `lttng view` and 
potentially missed the output warning that events where discarded. Odd, sorry 
for the noise!

One more question though: Also, when I look at the above - can I find more 
information about the exact definition of these two tracepoints as used by 
LTTng? How do they compare to the in-kernel tracepoints available via perf?

$ perf list fault

List of pre-defined events (to be used in -e):

  alignment-faults                                   [Software event]
  emulation-faults                                   [Software event]
  major-faults                                       [Software event]
  minor-faults                                       [Software event]
  page-faults OR faults                              [Software event]

...
  exceptions:page_fault_kernel                       [Tracepoint event]
  exceptions:page_fault_user                         [Tracepoint event]
...

$ perf stat -e faults,major-faults,minor-faults \
            -e exceptions:page_fault_kernel,exceptions:page_fault_user \
       find /tmp > /dev/null
 Performance counter stats for 'find /tmp':

                96      faults                                                      
                 1      major-faults                                                
                95      minor-faults                                                
                 4      exceptions:page_fault_kernel                                   
                92      exceptions:page_fault_user 

I assume that LTTng wraps the lower two tracepoint events. Can I use the error 
codes to translate the events into the more familiar minor/major category? 
Looking at http://elixir.free-electrons.com/linux/latest/ident/
x86_pf_error_code doesn't make me believe I can use that easily? And the perf 
stat output above also makes me believe that fault_user vs. fault_kernel isn't 
what I'm looking for either?

Thanks


> 2017-05-24 12:00 GMT-04:00 Milian Wolff <milian.wolff@kdab.com>:
> > Hey all,
> > 
> > when I trace with perf, I can see page_faults occurring. But when I do
> > something like the following with lttng:
> > 
> > lttng create
> > lttng enable-channel kernel -k
> > lttng enable-event -c kernel -k -a
> > lttng start
> > # trigger page faults
> > lttng stop
> > 
> > then I do not see any page faults in tracecompass/babeltrace. What do I
> > need
> > to do to see those too? I'm aware that lttng comes with its own set of
> > tracepoints - i.e. it's not using the same tracepoints that perf knows
> > about.
> > But googling shows me e.g. this:
> > 
> > https://lists.lttng.org/pipermail/lttng-dev/2013-April/019954.html
> > https://lists.lttng.org/pipermail/lttng-dev/2016-May/026033.html
> > 
> > Which sounds like the feature should be available in lttng too?
> > 
> > I'm using the ArchLinux packages in AUR, i.e. version 2.9.2 of LTTng and
> > kernel 4.10.13-1.
> > 
> > Thanks
> > --
> > Milian Wolff | milian.wolff@kdab.com | Software Engineer
> > KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
> > Tel: +49-30-521325470
> > KDAB - The Qt Experts
> > _______________________________________________
> > lttng-dev mailing list
> > lttng-dev@lists.lttng.org
> > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3826 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

  parent reply	other threads:[~2017-05-29  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1807360.trHWC9KRqs@milian-kdab2>
2017-05-24 16:26 ` tracing page_faults with lttng? Francis Deslauriers
     [not found] ` <CADcCL0i-gZHviy_QZq_Krj_2zXiYvF-Z8BLu-3uQyA0anBfO-g@mail.gmail.com>
2017-05-29  8:44   ` Milian Wolff [this message]
     [not found]   ` <2312247.5OrstNElbn@milian-kdab2>
2019-10-12 21:31     ` Milian Wolff via lttng-dev
     [not found]     ` <3174598.JndGstr8t1@agathebauer>
2019-11-02 15:31       ` Milian Wolff via lttng-dev
     [not found]       ` <5848055.rMpeChdSCL@agathebauer>
2019-11-04 15:55         ` Francis Deslauriers
2017-05-24 16:00 Milian Wolff

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='2312247.5OrstNElbn__15480.977544985$1496047911$gmane$org@milian-kdab2' \
    --to=milian.wolff@kdab.com \
    --cc=francis.deslauriers@efficios.com \
    --cc=lttng-dev@lists.lttng.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).