* [lttng-dev] tracing page_faults with lttng?
@ 2017-05-24 16:00 Milian Wolff
2017-05-24 16:26 ` Francis Deslauriers
0 siblings, 1 reply; 3+ messages in thread
From: Milian Wolff @ 2017-05-24 16:00 UTC (permalink / raw)
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 at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20170524/0c3796f4/attachment.bin>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [lttng-dev] tracing page_faults with lttng?
2017-05-24 16:00 [lttng-dev] tracing page_faults with lttng? Milian Wolff
@ 2017-05-24 16:26 ` Francis Deslauriers
2017-05-29 8:44 ` Milian Wolff
0 siblings, 1 reply; 3+ messages in thread
From: Francis Deslauriers @ 2017-05-24 16:26 UTC (permalink / raw)
Hi Milian,
Are you running on an x86 processor?
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
Thank you,
Francis
2017-05-24 12:00 GMT-04:00 Milian Wolff <milian.wolff at 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 at 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 at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
--
Francis Deslauriers
Software developer
EfficiOS inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20170524/61ff6de5/attachment-0001.html>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [lttng-dev] tracing page_faults with lttng?
2017-05-24 16:26 ` Francis Deslauriers
@ 2017-05-29 8:44 ` Milian Wolff
0 siblings, 0 replies; 3+ messages in thread
From: Milian Wolff @ 2017-05-29 8:44 UTC (permalink / raw)
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 at 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 at 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 at lists.lttng.org
> > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20170529/a4f26f0b/attachment.bin>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-29 8:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 16:00 [lttng-dev] tracing page_faults with lttng? Milian Wolff
2017-05-24 16:26 ` Francis Deslauriers
2017-05-29 8:44 ` Milian Wolff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox