From ef920c4fd45a498c84066dcc792f5ee600f6b2b3 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Tue, 31 Oct 2023 21:54:01 +0000 Subject: [PATCH] Fix compinent --- xprof/btx_aggreg.cpp | 4 ++-- xprof/btx_tally.cpp | 6 +++--- xprof/btx_timeline.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xprof/btx_aggreg.cpp b/xprof/btx_aggreg.cpp index 965455ae..5100f611 100644 --- a/xprof/btx_aggreg.cpp +++ b/xprof/btx_aggreg.cpp @@ -17,11 +17,11 @@ struct aggreg_s { }; using aggreg_t = struct aggreg_s; -static void initialize_component_callback(void *btx_handle, void **usr_data) { +static void initialize_component_callback(void **usr_data) { *usr_data = new aggreg_t; } -static void finalize_component_callback(void *btx_handle, void *usr_data) { +static void finalize_component_callback(void *usr_data) { auto *data = static_cast(usr_data); delete data; } diff --git a/xprof/btx_tally.cpp b/xprof/btx_tally.cpp index c3a50c53..eb9f27d6 100644 --- a/xprof/btx_tally.cpp +++ b/xprof/btx_tally.cpp @@ -173,7 +173,7 @@ static void print_metadata(std::vector metadata) { std::cout << value << std::endl; } -static void initialize_component_callback(void *btx_handle, void **usr_data) { +static void initialize_component_callback(void **usr_data) { /* User allocates its own data structure */ auto *data = new tally_dispatch_t; *usr_data = data; @@ -190,7 +190,7 @@ static void initialize_component_callback(void *btx_handle, void **usr_data) { }; } -static void read_params_callback(void *btx_handle, void *usr_data, btx_params_t *usr_params) { +static void read_params_callback(void *usr_data, btx_params_t *usr_params) { auto *data = static_cast(usr_data); data->params = usr_params; @@ -209,7 +209,7 @@ static void read_params_callback(void *btx_handle, void *usr_data, btx_params_t } } -static void finalize_component_callback(void *btx_handle, void *usr_data) { +static void finalize_component_callback(void *usr_data) { auto *data = static_cast(usr_data); diff --git a/xprof/btx_timeline.cpp b/xprof/btx_timeline.cpp index b2cf6616..278a4060 100644 --- a/xprof/btx_timeline.cpp +++ b/xprof/btx_timeline.cpp @@ -297,11 +297,11 @@ static void add_event_async(timeline_dispatch_t *dispatch, std::string hostname, add_event_end(dispatch, track_uuid, end); } -void btx_initialize_component_callback(void *btx_handle, void **usr_data) { +void btx_initialize_component_callback(void **usr_data) { *usr_data = new timeline_dispatch_t; } -void btx_finalize_component_callback(void *btx_handle, void *usr_data) { +void btx_finalize_component_callback(void *usr_data) { auto *dispatch = static_cast(usr_data); for (auto &[uuid, s] : dispatch->uuid2stack) { while (!s.empty()) {