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: [patch 0/1] extending low-level markers


Noah Watkins <nwatkins@ittc.ku.edu> writes:

> [...]
> The locks are aquired and released in each _start and _end marker, so
> the equilibrium is not a issue.

But it becomes an issue should preemption, or control flow upset such
as an early return or recursion, occurs between the start and end
markers.

> A more sane example is the insertion of values into a histogram. Instead
> of the instrumenation point logging the values and having the histogram
> constructed during a post-process step, data structures implemented the
> histogrm are associated with the instrumenation point. The lock protects
> this structure in a more intuitive way than the interval example.

A better way may be to do what we do in systemtap scripts: in a
interval-start type probe, store the start value in a table indexed by
thread-id and nesting-level; in the interval-end type probe, find the
corresponding value, compute the difference (as appropriate), and
store the result only then into your long-term lookup table.  This
approach requires *no locks* to survive between start & end: the
probes remain atomic.

> I think most of problems involving non atomicity of the
> connection/disconnection of probes can be accomplished by good house
> keeping and settings things up in phases which insure consistency.

A marker callback can take shortcuts, I guess, if it allows itself to
make assumptions about the ways it can be called.

I scanned over the thread, but still haven't seen a specific argument
for extra marker-type annotations that would relate to this issue.
What tool would need to scan the available markers, and how would
extra information allow it to do its job?

- FChE


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