Ar Gwe, 2006-09-15 am 10:35 -0400, ysgrifennodd Karim Yaghmour: > Care to explain how I can use to implement the equivalent of this: > > @@ -1709,6 +1712,7 @@ switch_tasks: > ++*switch_count; > > prepare_arch_switch(rq, next); > + TRACE_SCHEDCHANGE(prev, next); > prev = context_switch(rq, prev, next); > barrier(); The gdb debug data lets you find each line and also the variable assignments (except when highly optimised in some cases). Try breakpointing there with kgdb and using "where"... A kgdb script is the wrong way to do instrumentation but it does demonstrate the information is already out there, automatically generated and self maintaining. You do need the gdb -g debug data, but equally if it was static you'd need to recompile with the tracepoint because it would be off by default, and there is a very small risk in both cases you'll disturb or change the code behaviour/flow. > Also, care to explain how kprobes can be used to access same data > without having to actually customize a probe point for every binary? Thats why we have things like systemtap. All we appear to lack is systemtap ability to parse debug data so it can be told "trace on line 9 of sched.c and record rq and next" Alan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Martin Bligh <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: [email protected] (Frank Ch. Eigler)
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Tim Bird <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Karim Yaghmour <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- References:
- [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Mathieu Desnoyers <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Ingo Molnar <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Roman Zippel <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Ingo Molnar <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Roman Zippel <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Roman Zippel <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Ingo Molnar <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Tim Bird <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Alan Cox <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Roman Zippel <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Alan Cox <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Roman Zippel <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Alan Cox <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Roman Zippel <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Alan Cox <[email protected]>
- Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- From: Karim Yaghmour <[email protected]>
- [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- Prev by Date: Re: Re: Re: [RFC] PAGE_RW Should be added to PAGE_COPY ?
- Next by Date: Re: design of screen-locks for text-mode sessions
- Previous by thread: Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- Next by thread: Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
- Index(es):