I’m using TraceEvent(_NTO_TRACE_ADDCLASSEVHANDLER, _NTO_TRACE_THREAD, …)
and it’s not quite clear to me from the docs how event_data_t.data_array
is used.
Is data_array used only by user-defined code? Can I set it to NULL if
I don’t use it?
What I’ve been told is that data_array is what the event handler
receives the data in. Exactly how much of it is used is related to the
type of event. It is crucial that this is defined and that it is large
enough to handle the data that is passed into the appropriate event
handler for that event.
So judging from that, I think that it can’t be NULL because it must be
there to hold data, regardless if you are going to use the data or not.
I’m using TraceEvent(_NTO_TRACE_ADDCLASSEVHANDLER, _NTO_TRACE_THREAD, …)
and it’s not quite clear to me from the docs how event_data_t.data_array
is used.
Is data_array used only by user-defined code? Can I set it to NULL if
I don’t use it?
I’m using TraceEvent(_NTO_TRACE_ADDCLASSEVHANDLER, _NTO_TRACE_THREAD, …)
and it’s not quite clear to me from the docs how event_data_t.data_array
is used.
Is data_array used only by user-defined code? Can I set it to NULL if
I don’t use it?
That’s because there isn’t a complete table. Only the kernel calls are doc’d (I should PR that!)
The payload of a simple event is two words, so the smallest data_array usage will be 8 bytes.
The largest will be at least 34 words (136 bytes) ( that’s the largest proc_create_name event )
I was under the impression that, in fast mode, all events are simple
events.
Is that not correct? Does the event handler function still get passed
full combine events?
That’s because there isn’t a complete table. Only the kernel calls are
doc’d (I should PR that!)
The payload of a simple event is two words, so the smallest data_array
usage will be 8 bytes.
The largest will be at least 34 words (136 bytes) ( that’s the largest
proc_create_name event )
I was under the impression that, in fast mode, all events are simple
events.
Is that not correct? Does the event handler function still get passed
full combine events?