+ /* Both begin and end events did not get the key. */Should not be able to get here with event unset, so the next 2 lines should not be needed. ie., you only want to process events where the begin event was seen in which case event is defined.
+ if (!event&& key->key == INVALID_KEY)
+ return;
+
In some case, the 'begin event' just records the start timestamp, the actually event
is recognised in the 'end event'.
Take mmio-read for example, in the old kernel, we use kvm-exit as the 'begin event'
and kvm_mmio(KVM_TRACE_MMIO_READ...) is the 'end event'.