<div dir="ltr">Hi Folks,<div><br></div><div>Im trying to get a handle on how the Trace meta data collection works - i can roughly get a grasp of what the SYSCALL_METADA macro does but there are a few curious compiler flags that I&#39;ve never used before, and think i need some help understanding their implications.</div><div><br></div><div>Ive been looking in vim include/linux/syscalls.h and look at the macros SYSCALL_TRACE_ENTER_EVENT SYSCALL_TRACE_EXIT_EVENT SYSCALL_METADATA and these macros create some data structures,  but don&#39;t seem to call any functions to make any use of them, so I&#39;m assuming that these macros set up some data structures used by something else.</div><div><br></div><div>They all end with an assignment that has a compiler directive like __attribute__((section(&quot;xxxxxx&quot;))) for example, SYSCALL_METADATA ends with </div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>static struct syscall_metadata __used                   \</div></div></blockquote></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>          __attribute__((section(&quot;__syscalls_metadata&quot;)))       \</div></div></blockquote></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>         *__p_syscall_meta_##sname = &amp;__syscall_meta_##sname;</div></div><div><br></div></blockquote></blockquote></blockquote>This data structure has been been placed into a special section in the kernel called &quot;__syscalls_metadata&quot; Is this a heap kind of area somewhere ? i assume that something is watching this area for changes (or being signal somehow) so it will see these changes in data ?<div><br></div><div>the macros SYSCALL_TRACE_ENTER_EVENT have similar attributes on their assignment that put the data into &quot;_ftrace_events&quot;.</div><div><br></div><div>I suppose trying to follow logically through the code has now put me into a bit of a dead end - can anyone point me to the documentation / code that reads this data so i can complete the chain  execution ?</div><div><br></div><div>Cheers</div><div>Dave</div><div><br></div></div>