[lttng-dev] [RFC] LTTng-UST loglevels

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Feb 14 16:02:15 EST 2012


My idea of "TRACE_DEBUG_LINE" vs "TRACE_DEBUG_FUNCTION" is the
following:

"TRACE_DEBUG_FUNCTION" can be used to trace information required to
understand what is happening at a function level. But for very large
functions (this could very well happen, I've seen some not-so-nice
examples in Javascript interpreters lately), we could be interested to
understand what is happening at the block level.

But I found that TRACE_DEBUG_BLOCK could mean various things depending
on the programmer's background, so TRACE_DEBUG_LINE was the nearest
match.

Thoughts ?

Thanks,

Mathieu

* Matthew Khouzam (matthew.khouzam at ericsson.com) wrote:
> Those are per-line example, you don't need IMO to put one tracepoint per
> line, you just need the fact that it is at a line level to be called
> trace_debug_line
> 
> maybe you would put __LINE__ and __FILE__ as arguments for the tracepoint?
> 
> On 12-02-14 11:54 AM, Yannick Brosseau wrote:
> > What's "per-line" in your example?
> >
> > On 2012-02-14 11:41, Matthew Khouzam wrote:
> >> Two use cases I see for per-line logging:
> >> (forgive my pseudocode)
> >>
> >> func()
> >> {
> >> stuff();
> >> stuff(); tracepoint(mytrace);
> >> (morestuff()++)->my_func();
> >> }
> >>
> >>
> >> or if you have a 100+ line function and you want to see it arrive at
> >> certain checkpoints.
> >>
> >>
> >>
> >> On 12-02-13 02:35 PM, Michel Dagenais wrote:
> >>>>>         TRACE_DEBUG_SYSTEM      = 7,
> >>>>>         TRACE_DEBUG_PROGRAM     = 8,
> >>>>>         TRACE_DEBUG_PROCESS     = 9,
> >>>>>         TRACE_DEBUG_MODULE      = 10,
> >>>>>         TRACE_DEBUG_UNIT        = 11,
> >>>>>         TRACE_DEBUG_FUNCTION    = 12,
> >>>>>         TRACE_DEBUG_LINE        = 13,
> >>>>>
> >>>>>
> >>>> I still don't understand how we should choose to use any of the
> >>>> TRACE_DEBUG levels.
> >>> I would guess that you start at level 7 for everywhere to discover which program is problematic, then you enable level 8 for the problematic program and find the offending process, and so on to dig into a problem up to the "line" level. I would not expect tracepoints at the line level... though.
> >>>
> >>> _______________________________________________
> >>> 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
> >
> > _______________________________________________
> > 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
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list