qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tcg: add ability to dump /tmp/perf-<pid>.map fi


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] tcg: add ability to dump /tmp/perf-<pid>.map files
Date: Fri, 11 Jul 2014 09:52:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 07/11/2014 09:43 AM, Alex Bennée wrote:
> +/* if I could put this in a header easily.... */
> +void tb_enable_perfmap(void);

How about next to tb_flush in exec/exec-all.h?

> +
> +void tb_enable_perfmap(void) {

Watch the { placement.

> +    gchar * map_file = g_strdup_printf("/tmp/perf-%d.map", getpid());
> +    tb_perfmap = fopen(map_file, "w");
> +    g_free(map_file);
> +}

And speaking of tb_flush, ought there be some marker in the perf file to reset
things?  Otherwise you're just going to wind up with garbage if you let the
guest run long enough.

Of course, I have no idea how to link the flush with a timestamp that allows
one to selectively choose which section of the perf file one uses...


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]