On Tue, 22 Aug 2023 at 10:01, Alex Bennée <alex.ben...@linaro.org> wrote: > > > Igor Lesik <lesiki...@meta.com> writes: > > > Hi. > > > > I am wondering why trace events like trace_exec_tb(tb, pc) do not have > > cpu index, how to make sense of the trace in case of multiple vCPUs? > > I have changed it to trace_exec_tb(tb, pc, cpu->cpu_index) to read my > > trace, and now wondering should not it be there by default? Am I > > missing something? > > Not necessarily but be aware trace_exec_tb won't catch every execution > of a TB without -d nochain anyway. There are other trace points/logging > methods you could use (-d cpu) which follow the executed PC more closely > although without the TB associated with it, although again needing > nochain for completeness.
Also odd is: why is the trace_exec_tb() tracepoint duplicated before both calls to cpu_tb_exec() rather than just being once inside the function itself, where the CPU_LOG_EXEC logging happens ? (I suspect the answer partly here is "most people logging CPU execution stuff use the -d logging, not the tracepoints", but I could be wrong and maybe that's just the way I do it. Certainly the -d logging gives more detail, including TB flags and symbol information for the PC value.) thanks -- PMM