On Fri, May 6, 2022 at 7:18 PM christopher lee <christopher.lee.eu@xxxxxxxxx> wrote: > > Hi all, > > I use libtraceevent in my trace tool to parse the event log. Now I > allocated an instance, but no idea how to use > tep_register_event_handler() to register a handler for the instance. Is > it possilbe to register handler for the event in the instance? > Hi Chrit, All trace events are the same across all trace instances, thus the handler registered with tep_register_event_handler() handles events from all instances with a given id. That's why there are no "instance" oriented APIs in that library. I would suggest looking at the tracefs library, which is instance aware. It can be used to allocate trace instances and read events from a given instance. https://trace-cmd.org/Documentation/libtracefs/ > https://trace-cmd.org/Documentation/libtraceevent/libtraceevent-reg_event_handler.html > > thanks for any information. > > Best regards, > Chrit -- Tzvetomir (Ceco) Stoyanov VMware Open Source Technology Center