MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / processEventCallback

Method processEventCallback

internal/etw/trace.go:410–419  ·  view source on GitHub ↗

processEventCallback is the event callback function signature that is called each time a new event is available on the session buffer. It does the heavy lifting of parsing incoming ETW events from raw data buffers, building the state machine, and pushing events to the channel.

(ev *etw.EventRecord)

Source from the content-addressed store, hash-verified

408// a new event is available on the session buffer. It does the heavy lifting of parsing incoming
409// ETW events from raw data buffers, building the state machine, and pushing events to the channel.
410func (t *Trace) processEventCallback(ev *etw.EventRecord) uintptr {
411 if t.consumer == nil {
412 panic("consumer is nil")
413 }
414 if err := t.consumer.ProcessEvent(ev); err != nil {
415 t.errs <- err
416 eventsFailed.Add(err.Error(), 1)
417 }
418 return callbackNext
419}
420
421// bufferStatsCallback is periodically triggered by ETW subsystem for the purpose of reporting
422// buffer statistics, such as the number of buffers processed.

Callers

nothing calls this directly

Calls 3

ProcessEventMethod · 0.65
AddMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected