[lttng-dev] [RFC Patch Tools 0/4] Configurable lttng-probe modules

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Sat Apr 26 06:14:28 EDT 2014


----- Original Message -----
> From: "David Goulet" <dgoulet at efficios.com>
> To: "Jan Glauber" <jan.glauber at gmail.com>
> Cc: lttng-dev at lists.lttng.org
> Sent: Monday, April 14, 2014 8:40:51 PM
> Subject: Re: [lttng-dev] [RFC Patch Tools 0/4] Configurable lttng-probe modules
> 
> On 11 Apr (10:40:47), Jan Glauber wrote:
> > On Thu, Apr 10, 2014 at 03:45:51PM -0400, David Goulet wrote:
> > > On 03 Apr (12:57:43), Jan Glauber wrote:
> > > > Hi LTTng'ers,
> > > > 
> > > > I've asked briefly for the configurable probes feature at the Tracing
> > > > summit,
> > > > here is an RFC how we could implement it.
> > > > 
> > > > Why I want to have this feature:
> > > > Currently the LTTng probes that are loaded when a session is created
> > > > are defined
> > > > in a static list. If the user wants to change the loaded probes (for
> > > > instance
> > > > disable the very noisy rcu) then lttng-tools must be recompiled or the
> > > > modules must
> > > > be blacklisted or deleted. I also found that in our embedded
> > > > environment the default
> > > > busybox configuration is to disable the blacklist feature, so
> > > > blacklisting is not an
> > > > option.
> > > > 
> > > > Therefore I want to have a more flexible way of defining which probes
> > > > to load
> > > > on session start. We could use an environment variable that (if
> > > > present)
> > > > overrides the default and only loads the probes named in the variable.
> > > > 
> > > > Patch 1 is a cleanup and patch 2 & 3 are preparation for the feature in
> > > > patch 4.
> > > > Please review and give feedback if this approach is feasible.
> > > 
> > > Hi Jan,
> > > 
> > > First of all, thanks for this! Except some syntax issue, this looks
> > > great! Sorry took a while to respond, busy busy improving lttng :P.
> > 
> > Hi David,
> > 
> > thanks for reviewing! Also, I hope part of the improvement work was to
> > decide
> > on the name for the 2.5 release ;-
> 
> Always a priority! :P
> 
> > 
> > > Before we go further in mergin this, I see you took the approach of
> > > adding an env. variable to provide the list of probes you want to load.
> > > Right now in the upstream master (for 2.5), we have the support for a
> > > configuration file for lttng-sessiond. Could it be a way you would
> > > prefer (or use) instead of env. var? I understand that embedded stuff, a
> > > conf file might not be preferable.
> > 
> > Actually a config file was my first thought also, but I only found the
> > .lttngrc
> > which is generated when a session is started. Where is the sessiond config
> > file
> > located? I don't see a config file under /etc or in the home directory.
> 
> As of now, you have to pass it to the daemon:
> 
>   -f  --config                       Load daemon configuration file
> 
> For 2.5, we want to have a default config. file installed in /etc/lttng/
> and provide also documentation on it with probably a man page.
> 
> We went with the INI file format so in our case here I can see a simple
> option like:
> 
> modules = probe1, probe2, probe3, ...
> 
> and by default load ALL.
> 
> > 
> > > Anyhow, I'm comfortable merging this and adding this env. var but an
> > > option in the configuration file could also be awesome! :)
> > >
> > > One thing that would be great if you have a minute, is to send me a
> > > patch for the man page update of that new variable.
> > 
> > I'll do that when we've decided about config file vs. env variable...
> 
> Yeah to be thorough, we should have an ENV. variable, command line
> option and config option. ENV overrides cmdline which overrides config.

Did you rather mean:

- environment variables override config.
- cmdline options override environment variables and config,

Thanks,

Mathieu


> 
> For now, I'm OK merging your patches but having at least the
> configuration option in the config file for 2.5 would be very
> appreciated.
> 
> Cheers!
> David
> 
> > 
> > --Jan
> > 
> > 
> > > Cheers!
> > > David
> > > 
> > > > 
> > > > thanks,
> > > > Jan
> > > > ---
> > > > Harman Becker Automotive GmbH
> > > > System Profiling & Optimizing Team
> > > > 
> > > > 
> > > > Jan Glauber (4):
> > > >   Use common functions for module loading and unloading
> > > >   Seperate probe modules from control modules
> > > >   Remove required parameter from module parameters
> > > >   Dynamic probe list support
> > > > 
> > > >  src/bin/lttng-sessiond/kern-modules.h |    3 +-
> > > >  src/bin/lttng-sessiond/modprobe.c     |  292
> > > >  ++++++++++++++++++---------------
> > > >  src/common/defaults.h                 |    3 +
> > > >  src/common/utils.c                    |   10 ++
> > > >  src/common/utils.h                    |    1 +
> > > >  5 files changed, 172 insertions(+), 137 deletions(-)
> > > > 
> > > > --
> > > > 1.7.9.5
> > > > 
> > > > 
> > > > _______________________________________________
> > > > lttng-dev mailing list
> > > > lttng-dev at lists.lttng.org
> > > > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> > 
> > 
> 
> _______________________________________________
> 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