Skip to contentSkip to conversation

Static tracepoint control via trace-event

Qemu-devel Jan Kiszka 6 participants 16 messages Oct 19, 2010 – Oct 21, 2010

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi Stefan,

just had a closer look at qemu's new tracing framework. Looks cool, though it leaves a bit room for improvements. ;)

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

There are a few more things I have in mind (ftrace backend, enhanced "-trace" switch, wildcards for enabling tracepoints, and more tracepoints). Will hopefully come up with patches to address them, but this may take a while.

Jan

PS: Do you maintain a tracing git tree?

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#1 lore raw
Quoted 6 lines · Jan Kiszka

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

The motivation for "disable" producing a nop trace event is that it allows QEMU builds without certain trace events. A trace event cannot simply be removed by deleting its trace-events declaration since there are calls to its trace_*() function in the source tree. So this provided a way to disable trace events before simpletrace supported enabling/disabling trace events at runtime :).

Today that's no longer an issue for simpletrace and other tracing backends like LTTng UST and SystemTAP handle disabled trace events well.

I agree that keeping just one meaning for the "disable" keyword is better. Perhaps we should keep a separate "nop" keyword to build out specific trace events.

When would "nop" be handy? I think an ftrace backend is a good example. Since an ftrace marker cannot be enabled/disabled at runtime, the only way to silence unwanted trace events is to "nop" them at compile-time.

Quoted 4 lines

There are a few more things I have in mind (ftrace backend, enhanced "-trace" switch, wildcards for enabling tracepoints, and more tracepoints). Will hopefully come up with patches to address them, but this may take a while.

Sounds great.

Quoted 1 line

PS: Do you maintain a tracing git tree?

No, I'm reviewing patches as they are posted for qemu-devel. If the backlog between mailing list discussion and merge reaches the point where your patches are suffering conflicts please let me know and I can maintain one.

For the initial QEMU tracing effort I kept a tree but I stopped after the patches were accepted into mainline. The patches I write go straight to qemu-devel now.

Stefan

author
#2 lore raw
Quoted 25 lines · Stefan Hajnoczi
Quoted 6 lines · Jan Kiszka

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

The motivation for "disable" producing a nop trace event is that it allows QEMU builds without certain trace events. A trace event cannot simply be removed by deleting its trace-events declaration since there are calls to its trace_*() function in the source tree. So this provided a way to disable trace events before simpletrace supported enabling/disabling trace events at runtime :).

Today that's no longer an issue for simpletrace and other tracing backends like LTTng UST and SystemTAP handle disabled trace events well.

Quoted 7 lines

I agree that keeping just one meaning for the "disable" keyword is better. Perhaps we should keep a separate "nop" keyword to build out specific trace events.

When would "nop" be handy? I think an ftrace backend is a good example. Since an ftrace marker cannot be enabled/disabled at runtime, the only way to silence unwanted trace events is to "nop" them at compile-time.

Another to-do item is to remove the strange dependency of tracing managements features on CONFIG_SIMPLE_TRACE. That way the monitor commands and a to-be-added command line option to control individual tracepoints could of course also be used by an ftrace backend. I bet the DTrace backend will like to see this as well.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#3 lore raw
Quoted 34 lines · Jan Kiszka
Quoted 25 lines · Stefan Hajnoczi
Quoted 6 lines · Jan Kiszka

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

The motivation for "disable" producing a nop trace event is that it allows QEMU builds without certain trace events.  A trace event cannot simply be removed by deleting its trace-events declaration since there are calls to its trace_*() function in the source tree.  So this provided a way to disable trace events before simpletrace supported enabling/disabling trace events at runtime :).

Today that's no longer an issue for simpletrace and other tracing backends like LTTng UST and SystemTAP handle disabled trace events well.

Quoted 7 lines

I agree that keeping just one meaning for the "disable" keyword is better.  Perhaps we should keep a separate "nop" keyword to build out specific trace events.

When would "nop" be handy?  I think an ftrace backend is a good example. Since an ftrace marker cannot be enabled/disabled at runtime, the only way to silence unwanted trace events is to "nop" them at compile-time.

Quoted 5 lines

Another to-do item is to remove the strange dependency of tracing managements features on CONFIG_SIMPLE_TRACE. That way the monitor commands and a to-be-added command line option to control individual tracepoints could of course also be used by an ftrace backend. I bet the DTrace backend will like to see this as well.

If there is a programmatic way of inspecting and toggling trace events from inside an instrumented process, then yes. If this is possible with SystemTAP we should think about it now before QMP tracing commands become available in a release.

Stefan

#4 lore raw
In reply to Jan Kiszka
Quoted 34 lines · Jan Kiszka
Quoted 25 lines · Stefan Hajnoczi
Quoted 6 lines · Jan Kiszka

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

The motivation for "disable" producing a nop trace event is that it allows QEMU builds without certain trace events. A trace event cannot simply be removed by deleting its trace-events declaration since there are calls to its trace_*() function in the source tree. So this provided a way to disable trace events before simpletrace supported enabling/disabling trace events at runtime :).

Today that's no longer an issue for simpletrace and other tracing backends like LTTng UST and SystemTAP handle disabled trace events well.

Quoted 7 lines

I agree that keeping just one meaning for the "disable" keyword is better. Perhaps we should keep a separate "nop" keyword to build out specific trace events.

When would "nop" be handy? I think an ftrace backend is a good example. Since an ftrace marker cannot be enabled/disabled at runtime, the only way to silence unwanted trace events is to "nop" them at compile-time.

Quoted 5 lines

Another to-do item is to remove the strange dependency of tracing managements features on CONFIG_SIMPLE_TRACE. That way the monitor commands and a to-be-added command line option to control individual tracepoints could of course also be used by an ftrace backend. I bet the DTrace backend will like to see this as well.

I don't see a need for any monitor commands or command line options for the DTrace backend, since everything is completely dynamically controlled based on the tracing scripts the user is running.

Regards,
Daniel

Signature · 4 lines
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
author
#5 lore raw
Quoted 41 lines · Daniel P. Berrange
Quoted 34 lines · Jan Kiszka
Quoted 25 lines · Stefan Hajnoczi
Quoted 6 lines · Jan Kiszka

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

The motivation for "disable" producing a nop trace event is that it allows QEMU builds without certain trace events. A trace event cannot simply be removed by deleting its trace-events declaration since there are calls to its trace_*() function in the source tree. So this provided a way to disable trace events before simpletrace supported enabling/disabling trace events at runtime :).

Today that's no longer an issue for simpletrace and other tracing backends like LTTng UST and SystemTAP handle disabled trace events well.

Quoted 7 lines

I agree that keeping just one meaning for the "disable" keyword is better. Perhaps we should keep a separate "nop" keyword to build out specific trace events.

When would "nop" be handy? I think an ftrace backend is a good example. Since an ftrace marker cannot be enabled/disabled at runtime, the only way to silence unwanted trace events is to "nop" them at compile-time.

Quoted 5 lines

Another to-do item is to remove the strange dependency of tracing managements features on CONFIG_SIMPLE_TRACE. That way the monitor commands and a to-be-added command line option to control individual tracepoints could of course also be used by an ftrace backend. I bet the DTrace backend will like to see this as well.

Quoted 3 lines

I don't see a need for any monitor commands or command line options for the DTrace backend, since everything is completely dynamically controlled based on the tracing scripts the user is running.

Ah, it's all dynamic probing, you just need the marks. OK, was a bad example. :)

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#6 lore raw
In reply to Jan Kiszka
Quoted 11 lines · Jan Kiszka

Hi Stefan,

just had a closer look at qemu's new tracing framework. Looks cool, though it leaves a bit room for improvements. ;)

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

FYI with the DTrace/SystemTAP backend I posted yesterday, the 'disable' keyword is effectively completely ignored. All tracepoints are disabled when QEMU is running normally. Only when a end user runs a dtrace script that references a QEMU tracepoint, is that specific tracepoint enabled.

Regards,
Daniel

Signature · 4 lines
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
#7 lore raw
Quoted 20 lines · Daniel P. Berrange
Quoted 11 lines · Jan Kiszka

Hi Stefan,

just had a closer look at qemu's new tracing framework. Looks cool, though it leaves a bit room for improvements. ;)

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

Quoted 4 lines

FYI with the DTrace/SystemTAP backend I posted yesterday, the 'disable' keyword is effectively completely ignored. All tracepoints are disabled when QEMU is running normally. Only when a end user runs a dtrace script that references a QEMU tracepoint, is that specific tracepoint enabled.

I think that makes sense for external trace backends. DTrace can launch a process for you with the probes you want enabled from the start. The simpletrace backend can't really do this so probes can be enabled/disabled at compile-time (e.g. early startup tracing).

Stefan

author
#8 lore raw
Quoted 26 lines · Stefan Hajnoczi
Quoted 20 lines · Daniel P. Berrange
Quoted 11 lines · Jan Kiszka

Hi Stefan,

just had a closer look at qemu's new tracing framework. Looks cool, though it leaves a bit room for improvements. ;)

One quirk I stumbled over quickly was the "disable" tag in trace-events. It confused me first as qemu starts without any tracepoint enabled by default and I thought I had to hack the file. Then I read the doc and wondered which exiting or future backend would come without sufficiently fast dynamic tracepoint control. Do you have any in mind?

Quoted 7 lines

Instead of making it a compile-time switch (except for simpletrace), I would vote for declaring the simpletrace usage as the only one: disable sets the default state of the dynamic tracepoint. That way we could use trace-events to define a useful set of standard, moderate-impact tracepoints that shall be on. Others will still be available once a backend is configured, but remain off until enabled during runtime. Anything else looks like overkill to me.

Quoted 4 lines

FYI with the DTrace/SystemTAP backend I posted yesterday, the 'disable' keyword is effectively completely ignored. All tracepoints are disabled when QEMU is running normally. Only when a end user runs a dtrace script that references a QEMU tracepoint, is that specific tracepoint enabled.

Quoted 4 lines

I think that makes sense for external trace backends. DTrace can launch a process for you with the probes you want enabled from the start. The simpletrace backend can't really do this so probes can be enabled/disabled at compile-time (e.g. early startup tracing).

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#9 lore raw

Tracing block devices (was: Re: [Qemu-devel] Static tracepoint control via trace-event)

Quoted 3 lines · Jan Kiszka

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Sorry that I've not been following this very closely, but does this sort of thing allow tracing reads and writes to block devices? Am I right in thinking that if a tracepoint existed in the right place, one could get a log file from that which could be post-processed in another tool?

cf:
http://rwmj.wordpress.com/2010/10/05/visualizing-reads-writes-and-alignment/#content

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
author
#10 lore raw

[Qemu-devel] Re: Tracing block devices

Quoted 11 lines · Richard W.M. Jones
Quoted 3 lines · Jan Kiszka

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Sorry that I've not been following this very closely, but does this sort of thing allow tracing reads and writes to block devices? Am I right in thinking that if a tracepoint existed in the right place, one could get a log file from that which could be post-processed in another tool?

Quoted 5 lines

cf:
http://rwmj.wordpress.com/2010/10/05/visualizing-reads-writes-and-alignment/#content

Rich.

Yes. The block layer is instrumented, not sure if already sufficiently, but you may simply want to try the simpletrace backend and inspect the result via its postprocessor (simpletrace.py).

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#11 lore raw

Re: Tracing block devices (was: Re: [Qemu-devel] Static tracepoint control via trace-event)

In reply to Richard W.M. Jones
Quoted 5 lines · Richard W.M. Jones
Quoted 3 lines · Jan Kiszka

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Quoted 8 lines

Sorry that I've not been following this very closely, but does this sort of thing allow tracing reads and writes to block devices? Am I right in thinking that if a tracepoint existed in the right place, one could get a log file from that which could be post-processed in another tool?

cf:
http://rwmj.wordpress.com/2010/10/05/visualizing-reads-writes-and-alignment/#content

Definitely, here is the commit that added bdrv_aio_writev/bdrv_aio_readv tracing. bdrv_aio_multiwrite has been traced for a while.

http://patchwork.ozlabs.org/patch/66843/

As an example, I use the following script to find all write requests that touch a given region. This is very useful for debugging image corruptions given a trace file:

The usage is:

find_overlapping_io.py <bs> <sector_num> <nb_sectors>

where bs is the block driver state pointer, sector_num is the starting sector address, and nb_sectors is the number of sectors.

#!/usr/bin/env python
import sys

def trace_filter(fobj, event, keys):
for line in fobj:
fields = line.strip().split()
if fields[0] != event:
continue

attrs = dict([(k, v) for k, v in (x.split('=') for x in fields[2:])]) match = True
for k, v in keys.iteritems():
if k not in attrs:
match = False
break
if attrs[k] != v:
match = False
break

if match:
yield attrs

def intersection(a_sector_num, a_nb_sectors, b_sector_num, b_nb_sectors):
return not (a_sector_num + a_nb_sectors <= b_sector_num or \
b_sector_num + b_nb_sectors <= a_sector_num)

bs, sector_num, nb_sectors = sys.argv[1:]
sector_num = int(sector_num, 0)
nb_sectors = int(nb_sectors, 0)

for req in trace_filter(sys.stdin, 'bdrv_aio_writev', {'bs': bs}):

    if intersection(sector_num, nb_sectors, int(req['sector_num'], 0), int(req['nb_sectors'], 0)):
        print req

Stefan

#12 lore raw

Re: Tracing block devices (was: Re: [Qemu-devel] Static tracepoint control via trace-event)

In reply to Richard W.M. Jones
Quoted 10 lines · Richard W.M. Jones
Quoted 3 lines · Jan Kiszka

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Sorry that I've not been following this very closely, but does this sort of thing allow tracing reads and writes to block devices? Am I right in thinking that if a tracepoint existed in the right place, one could get a log file from that which could be post-processed in another tool?

I don't think it does. But I have a patch that I need to update which outputs traces in the form of the Linux blktrace block I/O tracing tool, which does exactly what you need (and more). You can simply use all the blktrace-enabled tools, including seekwatcher on it.

#13 lore raw

Re: Tracing block devices (was: Re: [Qemu-devel] Static tracepoint control via trace-event)

Quoted 12 lines · Christoph Hellwig
Quoted 10 lines · Richard W.M. Jones
Quoted 3 lines · Jan Kiszka

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Sorry that I've not been following this very closely, but does this sort of thing allow tracing reads and writes to block devices? Am I right in thinking that if a tracepoint existed in the right place, one could get a log file from that which could be post-processed in another tool?

Quoted 4 lines

I don't think it does. But I have a patch that I need to update which outputs traces in the form of the Linux blktrace block I/O tracing tool, which does exactly what you need (and more). You can simply use all the blktrace-enabled tools, including seekwatcher on it.

It's on the to-do list to use blktrace instead, so a patch which changed qemu to produce blktrace-like output would be useful.

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
#14 lore raw

Re: Tracing block devices (was: Re: [Qemu-devel] Static tracepoint control via trace-event)

In reply to Christoph Hellwig
Quoted 12 lines · Christoph Hellwig
Quoted 10 lines · Richard W.M. Jones
Quoted 3 lines · Jan Kiszka

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Sorry that I've not been following this very closely, but does this sort of thing allow tracing reads and writes to block devices?  Am I right in thinking that if a tracepoint existed in the right place, one could get a log file from that which could be post-processed in another tool?

Quoted 4 lines

I don't think it does.  But I have a patch that I need to update which outputs traces in the form of the Linux blktrace block I/O tracing tool, which does exactly what you need (and more).  You can simply use all the blktrace-enabled tools, including seekwatcher on it.

There are trace events in qemu.git today that let you trace block read/write operations (device, sector, length, r/w information is there). Look at bdrv_aio_readv and bdrv_aio_writev in the trace-events file.

I can see the value of using existing tools to parse blktrace data. On the other hand blktrace is taylored to Linux's block layer and QEMU can only map to a subset of it. I'm interested in your patch too, is it a new block protocol or does it hook directly into block.c?

Stefan

#15 lore raw

Re: Tracing block devices (was: Re: [Qemu-devel] Static tracepoint control via trace-event)

In reply to Richard W.M. Jones
Quoted 5 lines · Richard W.M. Jones
Quoted 3 lines · Jan Kiszka

Once we have "-trace events=...", defining the list of active tracepoints before starting qemu will be trivial (e.g. via a config file). Of course, this requires that all tracepoints are built-in...

Quoted 8 lines

Sorry that I've not been following this very closely, but does this sort of thing allow tracing reads and writes to block devices? Am I right in thinking that if a tracepoint existed in the right place, one could get a log file from that which could be post-processed in another tool?

cf:
http://rwmj.wordpress.com/2010/10/05/visualizing-reads-writes-and-alignment/#content

While having a static tracepoint in the right place would be best, it is not strictly neccessary with a tool like DTrace/SystemTAP. With the qemu debuginfo available, those tools can dynamically insert a probe into any QEMU function at any point in the code. So you could easily replace your QEMU patch from that blog post with a simple trace script and get the same info dynamically. The benefit of static markers is that they can provide standard named probe point + args, which are stable long term, even as the code is re-factored/renamed/moved, etc.

Regards,
Daniel

Signature · 4 lines
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|