Commit 90fcdde4 authored by Thomas Applencourt's avatar Thomas Applencourt

Fix dispatchers

parent 3c194653
Pipeline #12555 failed with stage
......@@ -110,10 +110,6 @@ install-exec-hook::
ln -s $(libdir)/libTracerOpenCL.so.1.0.0 $(pkglibdir)/opencl/libOpenCL.so.1
ln -s $(pkglibdir)/opencl/libOpenCL.so.1 $(pkglibdir)/opencl/libOpenCL.so
clinterval_callbacks.cpp: $(srcdir)/clinterval_callbacks.cpp.erb $(srcdir)/gen_clprof.rb opencl_model.yaml babeltrace_cl_callbacks.h tracer_opencl.h
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_clprof.rb production
nodist_libCLProf_la_SOURCES = \
clinterval_callbacks.cpp \
clinterval_dispatchers.c \
......@@ -146,6 +142,9 @@ babeltrace_cl_callbacks.h: $(srcdir)/gen_babeltrace_cl_callbacks.rb opencl_model
babeltrace_cl_dispatchers.c: $(srcdir)/gen_babeltrace_cl_dispatchers.rb opencl_model.yaml
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_babeltrace_cl_dispatchers.rb > babeltrace_cl_dispatchers.c
clinterval_callbacks.cpp: $(srcdir)/clinterval_callbacks.cpp.erb $(srcdir)/gen_clprof.rb opencl_model.yaml babeltrace_cl_callbacks.h tracer_opencl.h
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_clprof.rb production
clinterval_callbacks.h: $(srcdir)/gen_babeltrace_cl_callbacks.rb opencl_model.yaml
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_babeltrace_cl_callbacks.rb clinterval > clinterval_callbacks.h
......@@ -158,6 +157,8 @@ clinterval.h: $(srcdir)/interval.h.erb
clinterval.c: $(srcdir)/interval.c.erb
$(ERB) namespace="clinterval" $(srcdir)/interval.c.erb > $(srcdir)/clinterval.c
nodist_libBabeltraceCL_la_SOURCES = \
babeltrace_cl_dispatchers.c \
babeltrace_cl_callbacks.h
......
......@@ -80,7 +80,7 @@ bt_component_class_initialize_method_status opencl_dispatch_initialize(
bt_self_component_sink_add_input_port(self_component_sink,
"in", NULL, NULL);
init_babeltrace_cl_dispatch(opencl_dispatch);
init_babeltrace_cl_dispatcher(opencl_dispatch);
return BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK;
}
......
......@@ -18,7 +18,7 @@ extern "C" {
struct babeltrace_cl_dispatch;
struct babeltrace_cl_callbacks;
extern void init_babeltrace_cl_dispatch(struct babeltrace_cl_dispatch *dispatch);
extern void init_babeltrace_cl_dispatcher(struct babeltrace_cl_dispatch *dispatch);
typedef void (babeltrace_cl_dispatcher_t)
(struct babeltrace_cl_dispatch *dispatch,
......
......@@ -140,7 +140,7 @@ EOF
}
puts <<EOF
void init_#{namespace}_dispatchers(struct #{namespace}_dispatch *dispatch) {
void init_#{namespace}_dispatcher(struct #{namespace}_dispatch *dispatch) {
EOF
opencl_model["events"].each_key { |name|
puts <<EOF
......
......@@ -210,11 +210,14 @@ install-exec-hook::
zeinterval_dispatchers.c: $(srcdir)/gen_babeltrace_ze_dispatchers.rb $(ZE_LIB_GEN) $(ZE_MODEL)
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_babeltrace_ze_dispatchers.rb "zeinterval" > $(srcdir)/clinterval_dispatchers.c
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_babeltrace_ze_dispatchers.rb "zeinterval" > zeinterval_dispatchers.c
zeinterval_callbacks.cpp: $(srcdir)/gen_zeprof.rb $(ZEPROF) babeltrace_ze_callbacks.h $(srcdir)/zeinterval_callbacks.cpp.erb
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_zeprof.rb
zeinterval_callbacks.h:
SRC_DIR=$(srcdir) $(RUBY) $(srcdir)/gen_babeltrace_ze_callbacks.rb "zeinterval" > zeinterval_callbacks.h
zeinterval.h: $(srcdir)/interval.h.erb
$(ERB) namespace="zeinterval" $(srcdir)/interval.h.erb > $(srcdir)/zeinterval.h
......@@ -223,16 +226,18 @@ zeinterval.c: $(srcdir)/interval.c.erb
CLEANFILES += \
zeprof.c \
zeinterval_callbacks.cpp \
zeinterval_callbacks.h
zeinterval_callbacks.cpp
nodist_libZEProf_la_SOURCES = \
zeprof.c \
zeprof.h \
zeinterval_callbacks.cpp \
zeinterval_callbacks.h \
babeltrace_ze_dispatchers.c
zeinterval_dispatchers.c \
zeinterval.c
libZEProf_la_SOURCES = \
babeltrace_ze.h
babeltrace_ze.h \
zeprof.c \
xprof_utils.cpp
libZEProf_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(srcdir)/include -I./
libZEProf_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Werror $(BABELTRACE2_CFLAGS)
......
......@@ -80,7 +80,7 @@ bt_component_class_initialize_method_status babeltrace_ze_dispatch_initialize(
bt_self_component_sink_add_input_port(self_component_sink,
"in", NULL, NULL);
init_babeltrace_ze_dispatch(babeltrace_ze_dispatch);
init_babeltrace_ze_dispatcher(babeltrace_ze_dispatch);
return BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK;
}
......
......@@ -18,7 +18,7 @@ extern "C" {
struct babeltrace_ze_dispatch;
struct babeltrace_ze_callbacks;
extern void init_babeltrace_ze_dispatch(struct babeltrace_ze_dispatch *ze_dispatch);
extern void init_babeltrace_ze_dispatcher(struct babeltrace_ze_dispatch *ze_dispatch);
typedef void (babeltrace_ze_dispatcher_t)
(struct babeltrace_ze_dispatch *ze_dispatch,
......
......@@ -365,18 +365,18 @@ ze_events.each { |provider, es|
gen_event_dispatch_init = lambda { |provider, c, dir|
puts <<EOF
#{namespace}_register_dispatcher(dispatch, "#{namespace}_#{provider}:#{c.name}_#{SUFFIXES[dir]}", &#{namespace}_#{provider}_#{c.name}_#{SUFFIXES[dir]}_dispatcher);
#{namespace}_register_dispatcher(dispatch, "#{provider}:#{c.name}_#{SUFFIXES[dir]}", &#{namespace}_#{provider}_#{c.name}_#{SUFFIXES[dir]}_dispatcher);
EOF
}
gen_extra_event_dispatch_init = lambda { |provider, e|
puts <<EOF
#{namespace}_register_dispatcher(dispatch, "#{namespace}_#{provider}:#{e["name"]}", &#{namespace}_#{provider}_#{e["name"]}_dispatcher);
#{namespace}_register_dispatcher(dispatch, "#{provider}:#{e["name"]}", &#{namespace}_#{provider}_#{e["name"]}_dispatcher);
EOF
}
puts <<EOF
void init_#{namespace}_dispatchers(struct #{namespace}_dispatch *dispatch) {
void init_#{namespace}_dispatcher(struct #{namespace}_dispatch *dispatch) {
EOF
provider = :lttng_ust_ze
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment