This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Slides demonstrating our systemtap usage in production


Hi, agentzh -

> I'd like to share some of my slides that demonstrate our usage of
> systemtap in the production environment:[...]
> http://agentzh.org/misc/slides/beer-meeting-2013-04-19.pdf
> http://agentzh.org/misc/slides/yapc-na-2013-flame-graphs.pdf
> http://agentzh.org/misc/slides/off-cpu-flame-graphs.pdf

Thanks, interesting work!


> [...]
> To make stap scripting easier and more modular (especially for
> userspace probing), I've introduced a simple macro-style language
> named stap++ atop systemtap:
>     https://github.com/agentzh/stapxx

It turns out that a lot of what you are doing in this package is
supported or almost supported in the base.  Would you be interested in
porting over the unique bits?


$^exec_path: ISTR there was a PR for this, but can't find it now.
             This functionality could go into core stap, implementing
             the exact same heuristic.  See how 
                 stap -e 'probe process.FOO {}' -c 'CMD ARGS...'
             is implemented.  One complication with this is compile-server
             mode (where -x-expansion cannot be relied upon to match -x on
             the invoking host).  We could just punt on this for now.


$^libFOO_path: Could be a combined with the above:
                 stap -e 'probe process.library("FOO").BAR { }' -c 'CMD ARGS...'


$^arg_NAME: Have you looked at the
                 stap ... -G name=value
            mechanism for setting integer/string globals?  If you desire
            named parameters in a context other than for global variables,
            perhaps stap could grow a -M macro='value' option, which would
            work like a
                 @define macro %( value %) 
            in an stpm file.


default values: in the context of globals, could be done thusly:
            stap -e '
               global foo = 5 /* default */
               probe begin { println(foo) }' -G foo=10


macros: since stap 2.0, see smakarov's @define facility:
            @define foo(x) %( 2, 4, @x %)
            probe begin { println ( @foo(6) ) }


tapset modules: we hadn't seen a requirement for module/namespacing constructs
                in the tapset, so things work more automagically:

                % cat tapset/socketfd-lookup.stp
                function BAR ()  { }
                % stap -Itapset -e 'probe begin { BAR() }'  # just works


@pfunc(): likely implementable as a single stap macro:
          @define pfunc(x) %( process.function(@x) %)


- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]