qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] [qemu-trace] how to add trace easily?


From: Sam
Subject: [Qemu-discuss] [qemu-trace] how to add trace easily?
Date: Wed, 19 Jul 2017 17:36:19 +0800

Hi all,

I'm debugging qemu start up process, I want to add a log in 'io_mem_init'
function in exce.c as bellow:

> static void io_mem_init(void)
> {
>     ADD_LOG_HERE_TO_RECORD_TIME();
>     memory_region_init_io(&io_mem_rom, NULL, &unassigned_mem_ops, NULL,
> NULL, UINT64_MAX);
>     memory_region_init_io(&io_mem_unassigned, NULL, &unassigned_mem_ops,
> NULL,
>                           NULL, UINT64_MAX);
>     memory_region_init_io(&io_mem_notdirty, NULL, &notdirty_mem_ops, NULL,
>                           NULL, UINT64_MAX);
>     memory_region_init_io(&io_mem_watch, NULL, &watch_mem_ops, NULL,
>                           NULL, UINT64_MAX);
>     ADD_LOG_HERE_TO_RECORD_TIME();
> }


I found I could use trace in qemu, but I don't know how to code, so I just
add "io_mem_init" into events file, which could not work.

And I found some one's log is like this:

> jma io_mem_init begin                     -- Tue Jul 18 07:47:59 2017
> jma io_mem_init end                        -- Tue Jul 18 07:47:59 2017
> jma qio_channel_socket_new begin -- Tue Jul 18 07:47:59 2017
> jma qio_channel_socket_new end    -- Tue Jul 18 07:47:59 2017
> jma qio_channel_socket_new begin -- Tue Jul 18 07:48:07 2017
> jma qio_channel_socket_new end    -- Tue Jul 18 07:48:07 2017


I don't know how could he do this easily? So how could I do to log
"ADD_LOG_HERE_TO_RECORD_TIME"? Thank you~


reply via email to

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