Move some parameter handling to tracepoint definition file

This commit is contained in:
Christophe Bedard 2019-12-14 11:20:53 -08:00
parent 6d67a7fa57
commit b0a318fb21
2 changed files with 7 additions and 8 deletions

View file

@ -29,17 +29,17 @@
#include <lttng/tracepoint.h> #include <lttng/tracepoint.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h>
TRACEPOINT_EVENT( TRACEPOINT_EVENT(
TRACEPOINT_PROVIDER, TRACEPOINT_PROVIDER,
rcl_init, rcl_init,
TP_ARGS( TP_ARGS(
const void *, context_handle_arg, const void *, context_handle_arg
const char *, version_arg
), ),
TP_FIELDS( TP_FIELDS(
ctf_integer_hex(const void *, context_handle, context_handle_arg) ctf_integer_hex(const void *, context_handle, context_handle_arg)
ctf_string(version, version_arg) ctf_string(version, tracetools_VERSION)
) )
) )
@ -215,11 +215,11 @@ TRACEPOINT_EVENT(
callback_start, callback_start,
TP_ARGS( TP_ARGS(
const void *, callback_arg, const void *, callback_arg,
int, is_intra_process_arg const bool, is_intra_process_arg
), ),
TP_FIELDS( TP_FIELDS(
ctf_integer_hex(const void *, callback, callback_arg) ctf_integer_hex(const void *, callback, callback_arg)
ctf_integer(int, is_intra_process, is_intra_process_arg) ctf_integer(int, is_intra_process, (is_intra_process_arg ? 1 : 0))
) )
) )

View file

@ -47,8 +47,7 @@ void TRACEPOINT(
{ {
CONDITIONAL_TP( CONDITIONAL_TP(
rcl_init, rcl_init,
context_handle, context_handle);
tracetools_VERSION);
} }
void TRACEPOINT( void TRACEPOINT(
@ -204,7 +203,7 @@ void TRACEPOINT(
CONDITIONAL_TP( CONDITIONAL_TP(
callback_start, callback_start,
callback, callback,
(is_intra_process ? 1 : 0)); is_intra_process);
} }
void TRACEPOINT( void TRACEPOINT(