[lttng-dev] TP_ARGS for TRACEPOINT_EVENT_CLASS and TRACEPOINT_EVENT_INSTANCE

2018-12-20 Thread Yonghong Yan
I am looking at the following example from lttng-ust manual. The same TP_ARGS ( ... ) are repeated in both the TRACEPOINT_EVENT_CLASS and TRACEPOINT_EVENT_INSTANCE definition. My understanding is that it actually allows using different arguments, even in this example it is the same. Am I right? I

Re: [lttng-dev] TP_ARGS for TRACEPOINT_EVENT_CLASS and TRACEPOINT_EVENT_INSTANCE

2018-12-20 Thread Philippe Proulx
On Thu, Dec 20, 2018 at 11:47 AM Yonghong Yan wrote: > > I am looking at the following example from lttng-ust manual. The same TP_ARGS > ( ... ) are repeated in both the TRACEPOINT_EVENT_CLASS and > TRACEPOINT_EVENT_INSTANCE definition. My understanding is that it actually > allows using differ

Re: [lttng-dev] TP_ARGS for TRACEPOINT_EVENT_CLASS and TRACEPOINT_EVENT_INSTANCE

2018-12-20 Thread Yonghong Yan
Then why bother to require to have the TP_ARGS in TRACEPOINT_EVENT_INSTANCE? Yonghong On Thu, Dec 20, 2018 at 11:56 AM Philippe Proulx wrote: > On Thu, Dec 20, 2018 at 11:47 AM Yonghong Yan wrote: > > > > I am looking at the following example from lttng-ust manual. The same > TP_ARGS ( ... ) a

Re: [lttng-dev] tracing multithread user program and API support for enabling/disabling events and for adding/removing context fields

2018-12-20 Thread Mathieu Desnoyers
- On Dec 19, 2018, at 5:07 PM, Yonghong Yan wrote: > Mathieu, > Thank you for your response. see inline ... > On Wed, Dec 19, 2018 at 4:20 PM Mathieu Desnoyers < [ > mailto:mathieu.desnoy...@efficios.com | mathieu.desnoy...@efficios.com ] > > wrote: [...] >>> 3. In the one channel/ring

Re: [lttng-dev] TP_ARGS for TRACEPOINT_EVENT_CLASS and TRACEPOINT_EVENT_INSTANCE

2018-12-20 Thread Mathieu Desnoyers
This is due to limitations of the C preprocessor. We need to have the TP_ARGS() available both in the TRACEPOINT_EVENT_INSTANCE(), which generates the tracepoint prototype used to validate type compability of the tracepoint callsite within the application, and within TRACEPOINT_EVENT_CLASS()

Re: [lttng-dev] tracing multithread user program and API support for enabling/disabling events and for adding/removing context fields

2018-12-20 Thread Mathieu Desnoyers
Hi, Can you define what you mean by "per-user-thread tracepoint" and "whole-user-process" ? AFAIK those concepts don't appear anywhere in the LTTng documentations. Thanks, Mathieu - On Dec 19, 2018, at 6:06 PM, Yonghong Yan wrote: > Got another question about lttng_enable_event():

Re: [lttng-dev] tracing multithread user program and API support for enabling/disabling events and for adding/removing context fields

2018-12-20 Thread Yonghong Yan
Thank you Mathieu. I agree that my question is not precise, but I got what I need from your answer. I wanted to know that when a user thread migrates, the ring buffer the events go to will change. This is not what we want, but i understand why LTTng does that way since it needs to trace the activit

Re: [lttng-dev] tracing multithread user program and API support for enabling/disabling events and for adding/removing context fields

2018-12-20 Thread Mathieu Desnoyers
If you want to follow the activity of a given thread, you would need to enable the "vtid" context with "lttng add-context -u -t vtid". Then, you will be able to follow the activity of each thread even though the events are recorded into per-cpu buffers. Cheers! Mathieu - On Dec 20, 20

[lttng-dev] [PATCH lttng-ust 1/4] Use a variable to select the dlopen lib in Makefiles

2018-12-20 Thread Michael Jeanson
Instead of multiple conditionnals, it makes for cleaner and more readable Makefiles. Signed-off-by: Michael Jeanson --- configure.ac | 8 +++- liblttng-ust-cyg-profile/Makefile.am | 17 ++--- liblttng-ust-dl/Makefile.am| 11 +++ li

[lttng-dev] [PATCH lttng-ust 2/4] Use config.h to define SONAME major number

2018-12-20 Thread Michael Jeanson
Signed-off-by: Michael Jeanson --- configure.ac | 2 +- liblttng-ust/Makefile.am | 2 -- liblttng-ust/lttng-ust-comm.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 431ed21a..9ab76501 100644 --- a/configure.ac +++ b/

[lttng-dev] [PATCH lttng-ust 3/4] Add silent rules support for docs

2018-12-20 Thread Michael Jeanson
Signed-off-by: Michael Jeanson --- doc/man/Makefile.am | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index fcc4c5c7..f562bfd1 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -47,26 +47,35 @@ MAN = $(M

[lttng-dev] [PATCH lttng-ust 4/4] Add silent mode to examples Makefiles

2018-12-20 Thread Michael Jeanson
Signed-off-by: Michael Jeanson --- doc/examples/Makefile.am | 10 +++--- doc/examples/clock-override/Makefile | 7 +-- doc/examples/demo-tracef/Makefile | 7 +-- doc/examples/demo-tracelog/Makefile| 7 +-- doc/examples/demo/Makefile | 22 +++

Re: [lttng-dev] tracing multithread user program and API support for enabling/disabling events and for adding/removing context fields

2018-12-20 Thread Yonghong Yan
Apologize for the wrong terms. I will ask in another way: I have multithread code, and if a thread calls lttng_enable_event (...), will it impact only the calling thread, or the threads spawned after that call, or all the threads of the process? Got your answer about vtid context. It is similar to

[lttng-dev] [PATCH lttng-tools] Remove duplicate check for dlopen

2018-12-20 Thread Michael Jeanson
Signed-off-by: Michael Jeanson --- configure.ac | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index bf1ef6f2..fa0edc44 100644 --- a/configure.ac +++ b/configure.ac @@ -217,15 +217,18 @@ AC_CHECK_LIB([rt], [clock_gettime, timer_c

Re: [lttng-dev] tracing multithread user program and API support for enabling/disabling events and for adding/removing context fields

2018-12-20 Thread Mathieu Desnoyers
It will impact tracing of _all_ threads of _all_ processes tracked by the targeted tracing session. "lttng_enable_event()" is by no mean a "fast" operation. It is a tracing control operation meant to be performed outside of fast-paths. Changing the design of LTTng from per-cpu to something el