You can insert Streamline Annotate macros in either user space or kernel space code. There are a few important considerations when using Annotate with kernel code.
NoteAs the Annotate macros might block, do not add them to kernel code in an interrupt context.
Insert Annotation macros in kernel code in the same way you would user space code, with the following exceptions:
- Do not call
ANNOTATE_SETUPin kernel code. This macro is a prerequisite for other Annotate macros in user-space code, but not in kernel code.
ANNOTATE_DEFINEis also unnecessary. You do not need to add an instance of
ANNOTATE_DEFINEin kernel code.
- You can only use the custom counter macros
ANNOTATE_COUNTER_VALUEin user space code.