Re: [lttng-dev] tracing page_faults with lttng?

2019-11-04 Thread Francis Deslauriers
Le sam. 2 nov. 2019, à 11 h 41, Milian Wolff via lttng-dev
 a écrit :
>
> On Samstag, 12. Oktober 2019 23:31:51 CET Milian Wolff via lttng-dev wrote:
> > On Montag, 29. Mai 2017 10:44:50 CEST Milian Wolff wrote:
> > > 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)
> >
> > Hey there,
> >
> > a follow up to the above question: What about tracing page faults on ARM?
> > Perf can do that, but I see no page_fault trace points in the output of
> > `lttng list -k`?
>
> ping?

Hi Milian,

I believe that the page fault event you see with Perf is a perf event,
not a trace event. What is the name of the event you see exactly?
In order to trace the page faults on Arm with LTTng, we will need to
add trace event tracepoints to the do_page_fault() functions in the
arm (or arm64) architecture of the kernel.



Francis



>
> --
> Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer
> KDAB (Deutschland) GmbH, a KDAB Group company
> Tel: +49-30-521325470
> KDAB - The Qt, C++ and OpenGL 
> Experts___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Francis Deslauriers
Computer Engineer
EfficiOS inc.
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] tracing page_faults with lttng?

2019-11-02 Thread Milian Wolff via lttng-dev
On Samstag, 12. Oktober 2019 23:31:51 CET Milian Wolff via lttng-dev wrote:
> On Montag, 29. Mai 2017 10:44:50 CEST Milian Wolff wrote:
> > 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)
> 
> Hey there,
> 
> a follow up to the above question: What about tracing page faults on ARM?
> Perf can do that, but I see no page_fault trace points in the output of
> `lttng list -k`?

ping?

-- 
Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts

smime.p7s
Description: S/MIME cryptographic signature
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] tracing page_faults with lttng?

2019-10-12 Thread Milian Wolff via lttng-dev
On Montag, 29. Mai 2017 10:44:50 CEST Milian Wolff wrote:
> 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)

Hey there,

a follow up to the above question: What about tracing page faults on ARM? Perf 
can do that, but I see no page_fault trace points in the output of `lttng list 
-k`?

Thanks

-- 
Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts

smime.p7s
Description: S/MIME cryptographic signature
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] tracing page_faults with lttng?

2017-05-29 Thread Milian Wolff
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 :
> > 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.wo...@kdab.com | Software Engineer
> > KDAB (Deutschland) GmbH 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.wo...@kdab.com | Software Engineer
KDAB (Deutschland) GmbH KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

smime.p7s
Description: S/MIME cryptographic signature
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] tracing page_faults with lttng?

2017-05-24 Thread Francis Deslauriers
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 :

> 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.wo...@kdab.com | Software Engineer
> KDAB (Deutschland) GmbH 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
>
>


-- 
Francis Deslauriers
Software developer
EfficiOS inc.
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev