Skip to content

Commit

Permalink
Update to metababel 1.0.0 and generate model from script
Browse files Browse the repository at this point in the history
  • Loading branch information
DonAurelio committed Oct 31, 2023
1 parent 8cc3960 commit 0d8723b
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 15,989 deletions.
13 changes: 9 additions & 4 deletions hip/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,17 @@ BTX_HIP_GENERATED = \
btx_filter_hip/btx_main.c

EXTRA_DIST = \
btx_model.yaml \
btx_interval_model.yaml \
btx_callbacks.yaml
btx_matching_model.yaml

$(BTX_HIP_GENERATED) &: btx_model.yaml btx_interval_model.yaml btx_callbacks.yaml
$(METABABEL) -u $(srcdir)/btx_model.yaml -d $(srcdir)/btx_interval_model.yaml -t FILTER -o btx_filter_hip -p hipinterval -c interval --callbacks $(srcdir)/btx_callbacks.yaml -i hip.h.include
babeltrace_to_metababel_model.rb: $(top_srcdir)/utils/babeltrace_to_metababel_model.rb
cp $< $@

btx_model.yaml: babeltrace_to_metababel_model.rb hip_babeltrace_model.yaml
$(RUBY) $^ > $@

$(BTX_HIP_GENERATED) &: btx_interval_model.yaml btx_matching_model.yaml btx_model.yaml
$(METABABEL) -u btx_model.yaml -d $(srcdir)/btx_interval_model.yaml -t FILTER -o btx_filter_hip -p hipinterval -c interval --matching $(srcdir)/btx_matching_model.yaml -i hip.h.include

$(MODIFIED_HIP_HDR) &: $(HIP_HDR) $(srcdir)/headers.patch
$(RM) -r modified_include/
Expand Down
4 changes: 2 additions & 2 deletions hip/btx_hipinterval_callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ static void send_host_message(void *btx_handle, void *usr_data, int64_t ts,
event_class_name_striped.c_str(), (ts - _start), err);
}

void btx_initialize_component(void *btx_handle, void **usr_data) { *usr_data = new data_t; }
void btx_initialize_component(void **usr_data) { *usr_data = new data_t; }

void btx_finalize_component(void *btx_handle, void *usr_data) {
void btx_finalize_component(void *usr_data) {
delete static_cast<data_t *>(usr_data);
}

Expand Down
File renamed without changes.
Loading

0 comments on commit 0d8723b

Please sign in to comment.