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, ¬dirty_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~