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: Enhancements to block IO & IO scheduler tapset


Prerna Saxena <prerna@linux.vnet.ibm.com> writes:

> Here is a patch to add tracepoint-based probes to block IO and IO
> scheduler tapsets.

Thank you.

> I had to add new probe aliases instead of adding fallbacks to
> existing probes because the tracepoint that flags an event, say ,
> elv_add_request, is not defined at function entry but somewhere in
> the interior. [...]

We don't have to have an exact match.  Likely a function-entry or
function-return probe would do, filtered with predicates that skip
inapplicable calls.

For example, your elv_add_request = kernel.trace("block_rq_insert")
seems to match recent kernel.function("elv_insert").
trace("block_rq_abort") ~= kernel.function("blk_start_request"),
perhaps with some filtering (cmd_flags | REQ_QUIET?).


> Also, the handlers for a lot of probe aliases are duplicated -- they
> essentially expose the same set of local variables available in the
> probe. Is there some way I could reduce duplication here ? [...]

> probe ioscheduler_trace.plug = kernel.trace("block_plug"),
> probe ioscheduler_trace.unplug_io = kernel.trace("block_unplug_io")
> {
> ..do something..
> }

We don't have a general preprocessor for such stuff.  Among the
possibilities:

- extending our own little preprocessor
  - so something like %( foo = token token token %) to define,
    %( foo %) to use

- running cpp
  - but that's bad because it'd mess up embedded-C code like #includes/#ifdefs

- running m4
  - possible; could run m4 on tapset/**/*.stp.m4 at systemtap build time
    or at run time
  - could make contextual script errors tricky
  - would not mess with embedded-C
  - m4_define(`foo',`token token token') to define,
    foo   to use
  - could export CONFIG_*, kernel_v, etc. variables for m4 conditionals

- doing nothing
  - so cut & paste as today 


- FChE


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