[ltt-dev] Thread names in LTTV-gui

Mathieu Desnoyers compudj at krystal.dyndns.org
Fri Apr 1 11:24:54 EDT 2011

* Ali Günhan Akyürek (aliakyurek at gmail.com) wrote:
> Hi all,
> I use the following triple and the kernel
> lttng: 0.173
> lttv: 0.12.29
> ltt-control: 0.81
> When I start my application and then start ltt deamon, I see the names of
> the threads created by my application the under Process column of control
> flow viewer in the lttv gui analyzer.

Because this uses the "enum_process_state", triggered by the events
saved by the statedump module executed at trace start to gather various
information about processes and other resources. For the process, I
think it uses its "comm" name as string identifier for process name.

> But if i start lttd deamon first and then start my application later, I see
> the executable name of my application for all threads in the gui.
> Do you have an idea, how i can solve it?

Hrm, I think you might want to consider instrumenting prctl() system
call (see prctl(2)). The one you are interested into is, I think
"PR_SET_NAME". I'm not entirely sure, but it should do. If this works,
we might consider pulling this new instrumentation point in the lttng

Currently, we only use "exec()" instrumentation to get the process name.
I would only make sense to allow be sensitive to the explicit name
changes done by prctl.



> Thanks,
> Best regards,
> Ali

> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.

More information about the lttng-dev mailing list