€•W[Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ%/translations/zh_CN/trace/tracepoints”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/zh_TW/trace/tracepoints”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/it_IT/trace/tracepoints”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ja_JP/trace/tracepoints”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ko_KR/trace/tracepoints”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/sp_SP/trace/tracepoints”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ"Using the Linux Kernel Tracepoints”h]”hŒ"Using the Linux Kernel Tracepoints”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒ?/var/lib/git/docbuild/linux/Documentation/trace/tracepoints.rst”h KubhŒ field_list”“”)”}”(hhh]”hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hhÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÁhh¾hŸh¶h KubhŒ field_body”“”)”}”(hŒMathieu Desnoyers ”h]”hŒ paragraph”“”)”}”(hŒMathieu Desnoyers”h]”hŒMathieu Desnoyers”…””}”(hhÙhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KhhÓubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑhh¾ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h Khh¹hžhubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hh£hžhhŸh¶h KubhØ)”}”(hŒÓThis document introduces Linux Kernel Tracepoints and their use. It provides examples of how to insert tracepoints in the kernel and connect probe functions to them and provides some examples of probe functions.”h]”hŒÓThis document introduces Linux Kernel Tracepoints and their use. It provides examples of how to insert tracepoints in the kernel and connect probe functions to them and provides some examples of probe functions.”…””}”(hhùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒPurpose of tracepoints”h]”hŒPurpose of tracepoints”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h KubhØ)”}”(hXÇA tracepoint placed in code provides a hook to call a function (probe) that you can provide at runtime. A tracepoint can be "on" (a probe is connected to it) or "off" (no probe is attached). When a tracepoint is "off" it has no effect, except for adding a tiny time penalty (checking a condition for a branch) and space penalty (adding a few bytes for the function call at the end of the instrumented function and adds a data structure in a separate section). When a tracepoint is "on", the function you provide is called each time the tracepoint is executed, in the execution context of the caller. When the function provided ends its execution, it returns to the caller (continuing from the tracepoint site).”h]”hX×A tracepoint placed in code provides a hook to call a function (probe) that you can provide at runtime. A tracepoint can be “on†(a probe is connected to it) or “off†(no probe is attached). When a tracepoint is “off†it has no effect, except for adding a tiny time penalty (checking a condition for a branch) and space penalty (adding a few bytes for the function call at the end of the instrumented function and adds a data structure in a separate section). When a tracepoint is “onâ€, the function you provide is called each time the tracepoint is executed, in the execution context of the caller. When the function provided ends its execution, it returns to the caller (continuing from the tracepoint site).”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KhjhžhubhØ)”}”(hŒÛYou can put tracepoints at important locations in the code. They are lightweight hooks that can pass an arbitrary number of parameters, whose prototypes are described in a tracepoint declaration placed in a header file.”h]”hŒÛYou can put tracepoints at important locations in the code. They are lightweight hooks that can pass an arbitrary number of parameters, whose prototypes are described in a tracepoint declaration placed in a header file.”…””}”(hj&hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KhjhžhubhØ)”}”(hŒ8They can be used for tracing and performance accounting.”h]”hŒ8They can be used for tracing and performance accounting.”…””}”(hj4hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K!hjhžhubeh}”(h]”Œpurpose-of-tracepoints”ah ]”h"]”Œpurpose of tracepoints”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒUsage”h]”hŒUsage”…””}”(hjMhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjJhžhhŸh¶h K%ubhØ)”}”(hŒ+Two elements are required for tracepoints :”h]”hŒ+Two elements are required for tracepoints :”…””}”(hj[hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K&hjJhžhubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ1A tracepoint definition, placed in a header file.”h]”hØ)”}”(hjrh]”hŒ1A tracepoint definition, placed in a header file.”…””}”(hjthžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K(hjpubah}”(h]”h ]”h"]”h$]”h&]”uh1jnhjkhžhhŸh¶h Nubjo)”}”(hŒ%The tracepoint statement, in C code. ”h]”hØ)”}”(hŒ$The tracepoint statement, in C code.”h]”hŒ$The tracepoint statement, in C code.”…””}”(hj‹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K)hj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jnhjkhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jihŸh¶h K(hjJhžhubhØ)”}”(hŒCIn order to use tracepoints, you should include linux/tracepoint.h.”h]”hŒCIn order to use tracepoints, you should include linux/tracepoint.h.”…””}”(hj§hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K+hjJhžhubhØ)”}”(hŒ"In include/trace/events/subsys.h::”h]”hŒ!In include/trace/events/subsys.h:”…””}”(hjµhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K-hjJhžhubhŒ literal_block”“”)”}”(hXŠ#undef TRACE_SYSTEM #define TRACE_SYSTEM subsys #if !defined(_TRACE_SUBSYS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SUBSYS_H #include DECLARE_TRACE(subsys_eventname, TP_PROTO(int firstarg, struct task_struct *p), TP_ARGS(firstarg, p)); #endif /* _TRACE_SUBSYS_H */ /* This part must be outside protection */ #include ”h]”hXŠ#undef TRACE_SYSTEM #define TRACE_SYSTEM subsys #if !defined(_TRACE_SUBSYS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SUBSYS_H #include DECLARE_TRACE(subsys_eventname, TP_PROTO(int firstarg, struct task_struct *p), TP_ARGS(firstarg, p)); #endif /* _TRACE_SUBSYS_H */ /* This part must be outside protection */ #include ”…””}”hjÅsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jÃhŸh¶h K/hjJhžhubhØ)”}”(hŒ>In subsys/file.c (where the tracing statement must be added)::”h]”hŒ=In subsys/file.c (where the tracing statement must be added):”…””}”(hjÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K@hjJhžhubjÄ)”}”(hŒ¸#include #define CREATE_TRACE_POINTS DEFINE_TRACE(subsys_eventname); void somefct(void) { ... trace_subsys_eventname(arg, task); ... }”h]”hŒ¸#include #define CREATE_TRACE_POINTS DEFINE_TRACE(subsys_eventname); void somefct(void) { ... trace_subsys_eventname(arg, task); ... }”…””}”hjãsbah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1jÃhŸh¶h KBhjJhžhubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hXÞWhere : - subsys_eventname is an identifier unique to your event - subsys is the name of your subsystem. - eventname is the name of the event to trace. - `TP_PROTO(int firstarg, struct task_struct *p)` is the prototype of the function called by this tracepoint. - `TP_ARGS(firstarg, p)` are the parameters names, same as found in the prototype. - if you use the header in multiple source files, `#define CREATE_TRACE_POINTS` should appear only in one source file. ”h]”(hŒterm”“”)”}”(hŒWhere :”h]”hŒWhere :”…””}”(hjþhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jühŸh¶h K[hjøubhŒ definition”“”)”}”(hhh]”jj)”}”(hhh]”(jo)”}”(hŒsubsys_eventname is an identifier unique to your event - subsys is the name of your subsystem. - eventname is the name of the event to trace. ”h]”(hØ)”}”(hŒ6subsys_eventname is an identifier unique to your event”h]”hŒ6subsys_eventname is an identifier unique to your event”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KOhjubjj)”}”(hhh]”(jo)”}”(hŒ%subsys is the name of your subsystem.”h]”hØ)”}”(hj+h]”hŒ%subsys is the name of your subsystem.”…””}”(hj-hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KQhj)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jnhj&ubjo)”}”(hŒ-eventname is the name of the event to trace. ”h]”hØ)”}”(hŒ,eventname is the name of the event to trace.”h]”hŒ,eventname is the name of the event to trace.”…””}”(hjDhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KRhj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1jnhj&ubeh}”(h]”h ]”h"]”h$]”h&]”j¥j¦uh1jihŸh¶h KQhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jnhjubjo)”}”(hŒl`TP_PROTO(int firstarg, struct task_struct *p)` is the prototype of the function called by this tracepoint. ”h]”hØ)”}”(hŒk`TP_PROTO(int firstarg, struct task_struct *p)` is the prototype of the function called by this tracepoint.”h]”(hŒtitle_reference”“”)”}”(hŒ/`TP_PROTO(int firstarg, struct task_struct *p)`”h]”hŒ-TP_PROTO(int firstarg, struct task_struct *p)”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jlhjhubhŒ< is the prototype of the function called by this tracepoint.”…””}”(hjhhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KThjdubah}”(h]”h ]”h"]”h$]”h&]”uh1jnhjubjo)”}”(hŒQ`TP_ARGS(firstarg, p)` are the parameters names, same as found in the prototype. ”h]”hØ)”}”(hŒP`TP_ARGS(firstarg, p)` are the parameters names, same as found in the prototype.”h]”(jm)”}”(hŒ`TP_ARGS(firstarg, p)`”h]”hŒTP_ARGS(firstarg, p)”…””}”(hj”hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jlhjubhŒ: are the parameters names, same as found in the prototype.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KWhjŒubah}”(h]”h ]”h"]”h$]”h&]”uh1jnhjubjo)”}”(hŒuif you use the header in multiple source files, `#define CREATE_TRACE_POINTS` should appear only in one source file. ”h]”hØ)”}”(hŒtif you use the header in multiple source files, `#define CREATE_TRACE_POINTS` should appear only in one source file.”h]”(hŒ0if you use the header in multiple source files, ”…””}”(hj¶hžhhŸNh Nubjm)”}”(hŒ`#define CREATE_TRACE_POINTS`”h]”hŒ#define CREATE_TRACE_POINTS”…””}”(hj¾hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jlhj¶ubhŒ' should appear only in one source file.”…””}”(hj¶hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KZhj²ubah}”(h]”h ]”h"]”h$]”h&]”uh1jnhjubeh}”(h]”h ]”h"]”h$]”h&]”j¥j¦uh1jihŸh¶h KOhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjøubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöhŸh¶h K[hjóubah}”(h]”h ]”h"]”h$]”h&]”uh1jñhjJhžhhŸNh NubhØ)”}”(hXConnecting a function (probe) to a tracepoint is done by providing a probe (function to call) for the specific tracepoint through register_trace_subsys_eventname(). Removing a probe is done through unregister_trace_subsys_eventname(); it will remove the probe.”h]”hXConnecting a function (probe) to a tracepoint is done by providing a probe (function to call) for the specific tracepoint through register_trace_subsys_eventname(). Removing a probe is done through unregister_trace_subsys_eventname(); it will remove the probe.”…””}”(hjôhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K]hjJhžhubhØ)”}”(hXtracepoint_synchronize_unregister() must be called before the end of the module exit function to make sure there is no caller left using the probe. This, and the fact that preemption is disabled around the probe call, make sure that probe removal and module unload are safe.”h]”hXtracepoint_synchronize_unregister() must be called before the end of the module exit function to make sure there is no caller left using the probe. This, and the fact that preemption is disabled around the probe call, make sure that probe removal and module unload are safe.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KbhjJhžhubhØ)”}”(hXThe tracepoint mechanism supports inserting multiple instances of the same tracepoint, but a single definition must be made of a given tracepoint name over all the kernel to make sure no type conflict will occur. Name mangling of the tracepoints is done using the prototypes to make sure typing is correct. Verification of probe type correctness is done at the registration site by the compiler. Tracepoints can be put in inline functions, inlined static functions, and unrolled loops as well as regular functions.”h]”hXThe tracepoint mechanism supports inserting multiple instances of the same tracepoint, but a single definition must be made of a given tracepoint name over all the kernel to make sure no type conflict will occur. Name mangling of the tracepoints is done using the prototypes to make sure typing is correct. Verification of probe type correctness is done at the registration site by the compiler. Tracepoints can be put in inline functions, inlined static functions, and unrolled loops as well as regular functions.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KghjJhžhubhØ)”}”(hŒêThe naming scheme "subsys_event" is suggested here as a convention intended to limit collisions. Tracepoint names are global to the kernel: they are considered as being the same whether they are in the core kernel image or in modules.”h]”hŒîThe naming scheme “subsys_event†is suggested here as a convention intended to limit collisions. Tracepoint names are global to the kernel: they are considered as being the same whether they are in the core kernel image or in modules.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KphjJhžhubhØ)”}”(hŒ¢If the tracepoint has to be used in kernel modules, an EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be used to export the defined tracepoints.”h]”hŒ¢If the tracepoint has to be used in kernel modules, an EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be used to export the defined tracepoints.”…””}”(hj,hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KuhjJhžhubhØ)”}”(hŒ´If you need to do a bit of work for a tracepoint parameter, and that work is only used for the tracepoint, that work can be encapsulated within an if statement with the following::”h]”hŒ³If you need to do a bit of work for a tracepoint parameter, and that work is only used for the tracepoint, that work can be encapsulated within an if statement with the following:”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KyhjJhžhubjÄ)”}”(hŒ²if (trace_foo_bar_enabled()) { int i; int tot = 0; for (i = 0; i < count; i++) tot += calculate_nuggets(); trace_foo_bar(tot); }”h]”hŒ²if (trace_foo_bar_enabled()) { int i; int tot = 0; for (i = 0; i < count; i++) tot += calculate_nuggets(); trace_foo_bar(tot); }”…””}”hjHsbah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1jÃhŸh¶h K}hjJhžhubhØ)”}”(hXTAll trace_() calls have a matching trace__enabled() function defined that returns true if the tracepoint is enabled and false otherwise. The trace_() should always be within the block of the if (trace__enabled()) to prevent races between the tracepoint being enabled and the check being seen.”h]”hXTAll trace_() calls have a matching trace__enabled() function defined that returns true if the tracepoint is enabled and false otherwise. The trace_() should always be within the block of the if (trace__enabled()) to prevent races between the tracepoint being enabled and the check being seen.”…””}”(hjVhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K‡hjJhžhubhØ)”}”(hŒÅThe advantage of using the trace__enabled() is that it uses the static_key of the tracepoint to allow the if statement to be implemented with jump labels and avoid conditional branches.”h]”hŒÅThe advantage of using the trace__enabled() is that it uses the static_key of the tracepoint to allow the if statement to be implemented with jump labels and avoid conditional branches.”…””}”(hjdhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KhjJhžhubhŒnote”“”)”}”(hŒèThe convenience macro TRACE_EVENT provides an alternative way to define tracepoints. Check http://lwn.net/Articles/379903, http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362 for a series of articles with more details.”h]”hØ)”}”(hŒèThe convenience macro TRACE_EVENT provides an alternative way to define tracepoints. Check http://lwn.net/Articles/379903, http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362 for a series of articles with more details.”h]”(hŒ[The convenience macro TRACE_EVENT provides an alternative way to define tracepoints. Check ”…””}”(hjxhžhhŸNh NubhŒ reference”“”)”}”(hŒhttp://lwn.net/Articles/379903”h]”hŒhttp://lwn.net/Articles/379903”…””}”(hj‚hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j„uh1j€hjxubhŒ, ”…””}”(hjxhžhhŸNh Nubj)”}”(hŒhttp://lwn.net/Articles/381064”h]”hŒhttp://lwn.net/Articles/381064”…””}”(hj•hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j—uh1j€hjxubhŒ and ”…””}”(hjxhžhhŸNh Nubj)”}”(hŒhttp://lwn.net/Articles/383362”h]”hŒhttp://lwn.net/Articles/383362”…””}”(hj¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jªuh1j€hjxubhŒ, for a series of articles with more details.”…””}”(hjxhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K‘hjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjJhžhhŸh¶h NubhØ)”}”(hXØIf you require calling a tracepoint from a header file, it is not recommended to call one directly or to use the trace__enabled() function call, as tracepoints in header files can have side effects if a header is included from a file that has CREATE_TRACE_POINTS set, as well as the trace_() is not that small of an inline and can bloat the kernel if used by other inlined functions. Instead, include tracepoint-defs.h and use tracepoint_enabled().”h]”hXØIf you require calling a tracepoint from a header file, it is not recommended to call one directly or to use the trace__enabled() function call, as tracepoints in header files can have side effects if a header is included from a file that has CREATE_TRACE_POINTS set, as well as the trace_() is not that small of an inline and can bloat the kernel if used by other inlined functions. Instead, include tracepoint-defs.h and use tracepoint_enabled().”…””}”(hjÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K–hjJhžhubhØ)”}”(hŒ In a C file::”h]”hŒ In a C file:”…””}”(hjÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KžhjJhžhubjÄ)”}”(hŒDvoid do_trace_foo_bar_wrapper(args) { trace_foo_bar(args); }”h]”hŒDvoid do_trace_foo_bar_wrapper(args) { trace_foo_bar(args); }”…””}”hjãsbah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1jÃhŸh¶h K hjJhžhubhØ)”}”(hŒIn the header file::”h]”hŒIn the header file:”…””}”(hjñhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K¥hjJhžhubjÄ)”}”(hŒ¾DECLARE_TRACEPOINT(foo_bar); static inline void some_inline_function() { [..] if (tracepoint_enabled(foo_bar)) do_trace_foo_bar_wrapper(args); [..] }”h]”hŒ¾DECLARE_TRACEPOINT(foo_bar); static inline void some_inline_function() { [..] if (tracepoint_enabled(foo_bar)) do_trace_foo_bar_wrapper(args); [..] }”…””}”hjÿsbah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1jÃhŸh¶h K§hjJhžhubeh}”(h]”Œusage”ah ]”h"]”Œusage”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K%ubeh}”(h]”Œ"using-the-linux-kernel-tracepoints”ah ]”h"]”Œ"using the linux kernel tracepoints”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j@Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjjGjDjjuŒ nametypes”}”(j‰jG‰j‰uh}”(jh£jDjjjJuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.