[lttng-dev] Using LTTng to monitr several thread in one process (under vanilla 3.4.7)

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Aug 16 15:38:49 EDT 2013


* Zvi Vered (veredz72 at gmail.com) wrote:
> Hello,
>
> I’m using vanilla 3.4.7 on an Intel's Ivy-Bridge  PC104.
> The application (compiled and built with intel compiler) contains 8 threads.
>
> My goal it to use  “LTTng Project” to display all threads on a graph.
> Each thread will have its own “line” and I will be able to see when the 
> CPU is idle and when a specific thread works.
>
> In my PC104, Intel’s Ivy-Bridge has 4 cores. LTTng has to know on which 
> core a thread is currently running.
>
> Is it possible to do such things with Lttng ?

Yes, LTTng-UST (user space tracer) knows this information already. E.g.:

[15:33:02.414096656] (+0.000002546) thinkos ust_tests_hello:tptest: { cpu_id = 2 }, { intfield = 832, intfield2 = 0x340, longfield = 832, netintfield = 832, netintfieldhex = 0x340, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }

(see the "cpu_id" field above)

You can also record the vtid context with each event in lttng-ust. See
lttng(1) man page for more info.

Best regards,

Mathieu



> I asked this question long time ago and the answer was - no
>
> If yes, should I patch the kernel for this purpose ?
>
> Thanks,
> Zvika
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list