1 // SPDX-FileCopyrightText: 2023 Advanced Micro Devices, Inc. All rights reserved.
2 // SPDX-FileCopyrightText: 2024 EfficiOS, Inc.
4 // SPDX-License-Identifier: MIT
9 #include "lttng-roctx.h"
11 static void lttng_roctxMark(const char *message
)
13 lttng_ust_tracepoint(roctx
, mark
, message
);
14 next_roctx_core_table
.roctxMarkA_fn(message
);
17 static int lttng_roctxRangePush(const char *message
)
19 int level
= next_roctx_core_table
.roctxRangePushA_fn(message
);
21 lttng_ust_tracepoint(roctx
, range_push
, message
, level
);
26 static int lttng_roctxRangePop(void)
28 int level
= next_roctx_core_table
.roctxRangePop_fn();
30 lttng_ust_tracepoint(roctx
, range_pop
, level
);
35 static roctx_range_id_t
lttng_roctxRangeStart(const char *message
)
39 id
= next_roctx_core_table
.roctxRangeStartA_fn(message
);
41 lttng_ust_tracepoint(roctx
, range_start
, message
, id
);
46 static void lttng_roctxRangeStop(roctx_range_id_t id
)
48 lttng_ust_tracepoint(roctx
, range_stop
, id
);
49 next_roctx_core_table
.roctxRangeStop_fn(id
);
52 static int lttng_roctxGetThreadId(roctx_thread_id_t
*tid
)
54 int ret
= next_roctx_core_table
.roctxGetThreadId_fn(tid
);
55 lttng_ust_tracepoint(roctx
, get_thread_id
, *tid
);
59 static void lttng_roctx_install_wrappers(void)
61 lttng_roctx_core_table
.roctxMarkA_fn
= <tng_roctxMark
;
62 lttng_roctx_core_table
.roctxRangePushA_fn
= <tng_roctxRangePush
;
63 lttng_roctx_core_table
.roctxRangePop_fn
= <tng_roctxRangePop
;
64 lttng_roctx_core_table
.roctxRangeStartA_fn
= <tng_roctxRangeStart
;
65 lttng_roctx_core_table
.roctxRangeStop_fn
= <tng_roctxRangeStop
;
This page took 0.083917 seconds and 4 git commands to generate.