[ltt-dev] limiting LTTng to a certain set of cores

Mathieu Desnoyers compudj at krystal.dyndns.org
Wed Feb 11 12:55:39 EST 2009


* Andrew McDermott (andrew.mcdermott at windriver.com) wrote:
> 
> Is there an easy way to limit LTTng to trace a specified set of cores
> only?  I ask because in some 64+ core systems the data set collected
> becomes too large for analysis and the tasks to be analyzed are always
> bound to certain cores (using affinity).
> 
> I'm anticipating that this would require changes to LTTng - what I would
> like to know is how invasive those changes would need to be.
> 

Hi Andrew,

Basically, this could be done on a per tracing-session/per-channel basis
by adding an "active core" bit mask to test within ltt_vtrace and
ltt_serialize_data, in the loop where it iterates on active traces and
calls the "filter" callback. This bitmask would sit within the channel
structure. Setting the active cores should be added to the debugfs
interface :

People would do :
echo tracename > /mnt/debugfs/ltt/setup_trace
echo CPUNR > /mnt/debugfs/ltt/control/tracename/channel/channelname/cpus
cat /mnt/debugfs/ltt/control/tracename/channel/channelname/cpus
...

Maybe we should replace the "enable" test by a cpu mask test with all
cpus active to save some cycles...

And I don't particularly care about the exact debugfs file interface
(file name, the way the cpus are listed). Ideally if we can find
somewhere else in the Linux kernel where it is already done, that would
be a great inspiration source.

Thanks,

Mathieu

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

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68




More information about the lttng-dev mailing list