Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
DonAurelio committed Oct 31, 2023
2 parents 0d8723b + 5bcdf54 commit d85c707
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([thapi], [0.0.10], [[email protected]])
AC_INIT([thapi], [0.0.11], [[email protected]])
AC_CONFIG_SRCDIR([opencl/tracer_opencl_helpers.include.c])
AC_CONFIG_HEADERS([utils/config.h])

Expand Down Expand Up @@ -70,7 +70,7 @@ PKG_CHECK_MODULES([PROTOBUF], [protobuf >= 3.0])
AX_RUBY_EXTENSION([cast-to-yaml], [yes])
AX_RUBY_EXTENSION([nokogiri], [yes])
AX_RUBY_EXTENSION([babeltrace2], [yes])
AX_RUBY_EXTENSION([metababel >= 0.0.5], [yes])
AX_RUBY_EXTENSION([metababel >= 1.0.0], [yes])

# Checks for header files.
AC_CHECK_HEADERS([inttypes.h stddef.h stdint.h stdlib.h string.h unistd.h])
Expand Down
12 changes: 6 additions & 6 deletions xprof/btx_tally.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void print_metadata(std::vector<std::string> metadata) {
std::cout << value << std::endl;
}

static void initialize_component(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;
Expand All @@ -190,7 +190,7 @@ static void initialize_component(void **usr_data) {
};
}

static void read_params_callaback(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<tally_dispatch_t *>(usr_data);
data->params = usr_params;
Expand All @@ -209,7 +209,7 @@ static void read_params_callaback(void *usr_data, btx_params_t *usr_params) {
}
}

static void finalize_component(void *usr_data) {
static void finalize_component_callback(void *usr_data) {

auto *data = static_cast<tally_dispatch_t *>(usr_data);

Expand Down Expand Up @@ -345,9 +345,9 @@ static void ust_thapi_metadata_usr_callback(void *btx_handle, void *usr_data, co
}

void btx_register_usr_callbacks(void *btx_handle) {
btx_register_callbacks_initialize_component(btx_handle, &initialize_component);
btx_register_callbacks_read_params(btx_handle, &read_params_callaback);
btx_register_callbacks_finalize_component(btx_handle, &finalize_component);
btx_register_callbacks_initialize_component(btx_handle, &initialize_component_callback);
btx_register_callbacks_read_params(btx_handle, &read_params_callback);
btx_register_callbacks_finalize_component(btx_handle, &finalize_component_callback);

btx_register_callbacks_lttng_device_name(btx_handle, &device_name_usr_callback);
btx_register_callbacks_lttng_ust_thapi_metadata(btx_handle, &ust_thapi_metadata_usr_callback);
Expand Down
9 changes: 4 additions & 5 deletions xprof/btx_timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +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(void **usr_data) {

void btx_initialize_component_callback(void **usr_data) {
*usr_data = new timeline_dispatch_t;
}

void btx_finalize_component(void *usr_data) {
void btx_finalize_component_callback(void *usr_data) {
auto *dispatch = static_cast<timeline_dispatch_t *>(usr_data);
for (auto &[uuid, s] : dispatch->uuid2stack) {
while (!s.empty()) {
Expand Down Expand Up @@ -357,6 +356,6 @@ void btx_register_usr_callbacks(void *btx_handle) {
btx_register_callbacks_lttng_device(btx_handle, &device_usr_callback);
btx_register_callbacks_lttng_frequency(btx_handle, &frequency_usr_callback);
btx_register_callbacks_lttng_power(btx_handle, &power_usr_callback);
btx_register_callbacks_initialize_component(btx_handle, &btx_initialize_component);
btx_register_callbacks_finalize_component(btx_handle, &btx_finalize_component);
btx_register_callbacks_initialize_component(btx_handle, &btx_initialize_component_callback);
btx_register_callbacks_finalize_component(btx_handle, &btx_finalize_component_callback);
}

0 comments on commit d85c707

Please sign in to comment.