metababel 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/metababel +18 -6
- data/lib/metababel/bt2_trace_class_generator.rb +6 -3
- data/lib/metababel/version.rb +1 -1
- data/template/downstream.c.erb +6 -5
- data/template/filter.c.erb +23 -15
- data/template/sink.c.erb +9 -8
- data/template/source.c.erb +17 -11
- data/template/upstream.c.erb +3 -2
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2300af1bdf99bcc52ff067a635c5272fb7b4f843faad18638b7587ee8f5693b9
|
|
4
|
+
data.tar.gz: 21ad38ee40814173d3fda727a03ad0492c04192f5506d445652417ad5f873bd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72b7df6f07c3cf3ca42702b00ce83e7dad7696f69388abe421141686301dd97989b44d68b02e3f61de05be5e867870d2b9968e35fde192f6832a9dd09109cbfa
|
|
7
|
+
data.tar.gz: c244c572f89da35cfdeae2793357ba0a31760f39b594cc0a98a36a6c15c27df21df9c466cc19da573f0fddbc114e958a41f915530e2bb88782f6fced17a862d9
|
data/bin/metababel
CHANGED
|
@@ -7,6 +7,7 @@ require 'metababel'
|
|
|
7
7
|
require 'fileutils'
|
|
8
8
|
require 'set'
|
|
9
9
|
require 'ostruct'
|
|
10
|
+
require 'abbrev'
|
|
10
11
|
|
|
11
12
|
class Array
|
|
12
13
|
def join_with_prefix(sep)
|
|
@@ -54,14 +55,15 @@ class BaseDispatch
|
|
|
54
55
|
|
|
55
56
|
# https://ruby-doc.org/3.2.2/Hash.html#class-Hash-label-User-Defined+Hash+Keys
|
|
56
57
|
def ==(other)
|
|
57
|
-
self.class
|
|
58
|
+
other.is_a?(self.class) and
|
|
58
59
|
instance_variables.all? { |s| instance_variable_get(s) == other.instance_variable_get(s) }
|
|
59
60
|
end
|
|
60
61
|
|
|
61
62
|
alias eql? ==
|
|
62
63
|
|
|
63
64
|
def hash
|
|
64
|
-
|
|
65
|
+
@hash ||=
|
|
66
|
+
instance_variables.reduce(0) { |a, b| a ^ instance_variable_get(b).hash }
|
|
65
67
|
end
|
|
66
68
|
end
|
|
67
69
|
|
|
@@ -173,8 +175,13 @@ def parse_argv
|
|
|
173
175
|
exit
|
|
174
176
|
end
|
|
175
177
|
|
|
176
|
-
opts.on('-t', '--component TYPE',
|
|
177
|
-
|
|
178
|
+
opts.on('-t', '--component TYPE',
|
|
179
|
+
'[Mandatory] Node within a trace processing graph [one of: SINK, SOURCE, FILTER].') do |p|
|
|
180
|
+
l = %w[SOURCE FILTER SINK]
|
|
181
|
+
h = Abbrev.abbrev(l)
|
|
182
|
+
raise "Invalid component type, should be #{l} (case insentitive)" unless h.include?(p.upcase)
|
|
183
|
+
|
|
184
|
+
options[:component_type] = h[p.upcase]
|
|
178
185
|
end
|
|
179
186
|
|
|
180
187
|
opts.on('-u', '--upstreams PATH', Array, '[Mandatory] Path to the bt2 YAML files for the upstream model.') do |p|
|
|
@@ -212,7 +219,6 @@ def parse_argv
|
|
|
212
219
|
opts.on('--enable-callbacks NAME', Array, '[Optional] Enable some callbacks type') do |p|
|
|
213
220
|
options[:disable_callbaks] -= p.to_set
|
|
214
221
|
end
|
|
215
|
-
|
|
216
222
|
end.parse!
|
|
217
223
|
|
|
218
224
|
raise OptionParser::MissingArgument if options[:component_type].nil?
|
|
@@ -224,7 +230,13 @@ def parse_argv
|
|
|
224
230
|
end
|
|
225
231
|
|
|
226
232
|
def get_dispatch_type(em, default_clock_class, context)
|
|
227
|
-
|
|
233
|
+
|
|
234
|
+
begin
|
|
235
|
+
dispatchers = em.domain ? OpenStruct.new(context).instance_eval(em.domain) : context['all']
|
|
236
|
+
rescue StandardError
|
|
237
|
+
raise "Please ensure the domain '#{em.domain}' uses valid ruby expressions and all set_id have been previously defined. Current defined set_ids: #{context.keys}."
|
|
238
|
+
end
|
|
239
|
+
|
|
228
240
|
raise "Nil or empty event set for '#{em.set_id}'." unless dispatchers.is_a?(Set)
|
|
229
241
|
|
|
230
242
|
matched_dispatchers, signatures = dispatchers.filter_map do |dispatcher|
|
|
@@ -609,7 +609,7 @@ module Babeltrace2Gen
|
|
|
609
609
|
variable = bt_get_variable(arg_variables).name
|
|
610
610
|
|
|
611
611
|
pr "// Dump data to a temporal string."
|
|
612
|
-
pr "char *#{field}_temp = malloc(sizeof(#{variable}));"
|
|
612
|
+
pr "char *#{field}_temp = (char *)malloc(sizeof(#{variable}));"
|
|
613
613
|
pr "assert(#{field}_temp != NULL && \"Out of memory\");"
|
|
614
614
|
pr "memcpy(#{field}_temp, &#{variable}, sizeof(#{variable}));"
|
|
615
615
|
pr ""
|
|
@@ -731,10 +731,13 @@ module Babeltrace2Gen
|
|
|
731
731
|
|
|
732
732
|
attr_reader :parent, :name, :field_class
|
|
733
733
|
|
|
734
|
-
def initialize(parent:, field_class
|
|
734
|
+
def initialize(parent:, field_class: nil, name: nil)
|
|
735
735
|
@parent = parent
|
|
736
|
+
is_match_model = parent.rec_trace_class.match
|
|
737
|
+
raise ArgumentError.new("missing keyword: :name") unless name || is_match_model
|
|
738
|
+
raise ArgumentError.new("missing keyword: :field_class") unless field_class || is_match_model
|
|
736
739
|
@name = name # Name can be nil in the matching callbacks
|
|
737
|
-
@field_class = BTFieldClass.from_h(self, field_class)
|
|
740
|
+
@field_class = BTFieldClass.from_h(self, field_class || {} )
|
|
738
741
|
end
|
|
739
742
|
|
|
740
743
|
def bt_get_variable()
|
data/lib/metababel/version.rb
CHANGED
data/template/downstream.c.erb
CHANGED
|
@@ -20,8 +20,8 @@ void btx_downstream_move_messages(
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
static inline
|
|
24
|
-
|
|
23
|
+
static inline void
|
|
24
|
+
_btx_push_message(btx_message_iterator_t *message_iterator_private_data,
|
|
25
25
|
const bt_message *message) {
|
|
26
26
|
|
|
27
27
|
struct el *elt;
|
|
@@ -51,7 +51,7 @@ void btx_downstream_push_message(
|
|
|
51
51
|
btx_message_iterator_t *message_iterator_private_data,
|
|
52
52
|
const bt_message *message) {
|
|
53
53
|
|
|
54
|
-
<% unless options[:disable_callbaks].include?('on_downstream') %>
|
|
54
|
+
<% unless options[:disable_callbaks].include?('on_downstream') %>
|
|
55
55
|
on_downstream_message_callback_f *p =
|
|
56
56
|
(on_downstream_message_callback_f *)message_iterator_private_data
|
|
57
57
|
->common_data->on_downstream_message_callback;
|
|
@@ -60,7 +60,7 @@ void btx_downstream_push_message(
|
|
|
60
60
|
message_iterator_private_data->common_data->usr_data, message);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
<% end %>
|
|
63
|
+
<% end %>
|
|
64
64
|
_btx_push_message(message_iterator_private_data, message);
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -168,7 +168,8 @@ void btx_push_message_<%= e.name_sanitized %>(
|
|
|
168
168
|
_downstream_event<%= e.args.map{ |s| s.name }.join_with_prefix(", ") %>);
|
|
169
169
|
|
|
170
170
|
btx_message_iterator_t *_message_iterator_private_data =
|
|
171
|
-
bt_self_message_iterator_get_data(
|
|
171
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
172
|
+
common_data->self_message_iterator);
|
|
172
173
|
btx_downstream_push_message(_message_iterator_private_data, _message);
|
|
173
174
|
}
|
|
174
175
|
<% end %>
|
data/template/filter.c.erb
CHANGED
|
@@ -28,7 +28,8 @@ filter_message_iterator_next_finalizing(
|
|
|
28
28
|
bt_message_array_const messages, uint64_t capacity, uint64_t *count) {
|
|
29
29
|
|
|
30
30
|
btx_message_iterator_t *message_iterator_private_data =
|
|
31
|
-
bt_self_message_iterator_get_data(
|
|
31
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
32
|
+
self_message_iterator);
|
|
32
33
|
|
|
33
34
|
/* No more messages, we can stop the plugin, and transition to END */
|
|
34
35
|
if (!message_iterator_private_data->queue) {
|
|
@@ -55,7 +56,8 @@ filter_message_iterator_next_processing_sending(
|
|
|
55
56
|
bt_message_array_const messages, uint64_t capacity, uint64_t *count) {
|
|
56
57
|
/* Retrieve our private data from the message iterator's user data */
|
|
57
58
|
btx_message_iterator_t *message_iterator_private_data =
|
|
58
|
-
bt_self_message_iterator_get_data(
|
|
59
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
60
|
+
self_message_iterator);
|
|
59
61
|
|
|
60
62
|
/* This should never append. When transitioning to sending,
|
|
61
63
|
we check that we have some messages to send */
|
|
@@ -167,7 +169,8 @@ filter_message_iterator_next_processing_reading(
|
|
|
167
169
|
bt_message_array_const messages, uint64_t capacity, uint64_t *count) {
|
|
168
170
|
/* Retrieve our private data from the message iterator's user data */
|
|
169
171
|
btx_message_iterator_t *message_iterator_private_data =
|
|
170
|
-
bt_self_message_iterator_get_data(
|
|
172
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
173
|
+
self_message_iterator);
|
|
171
174
|
|
|
172
175
|
common_data_t *common_data = message_iterator_private_data->common_data;
|
|
173
176
|
|
|
@@ -229,7 +232,8 @@ filter_message_iterator_next_processing(
|
|
|
229
232
|
bt_message_array_const messages, uint64_t capacity, uint64_t *count) {
|
|
230
233
|
|
|
231
234
|
btx_message_iterator_t *message_iterator_private_data =
|
|
232
|
-
bt_self_message_iterator_get_data(
|
|
235
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
236
|
+
self_message_iterator);
|
|
233
237
|
|
|
234
238
|
switch (message_iterator_private_data->processing_state) {
|
|
235
239
|
case BTX_FILTER_PROCESSING_STATE_READING:
|
|
@@ -257,7 +261,8 @@ filter_message_iterator_next_initializing(
|
|
|
257
261
|
|
|
258
262
|
/* Retrieve our private data from the message iterator's user data */
|
|
259
263
|
btx_message_iterator_t *message_iterator_private_data =
|
|
260
|
-
bt_self_message_iterator_get_data(
|
|
264
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
265
|
+
self_message_iterator);
|
|
261
266
|
|
|
262
267
|
/* Begining of Stream */
|
|
263
268
|
btx_push_messages_stream_beginning(self_message_iterator,
|
|
@@ -293,7 +298,8 @@ filter_message_iterator_next(bt_self_message_iterator *self_message_iterator,
|
|
|
293
298
|
|
|
294
299
|
/* Retrieve our private data from the message iterator's user data */
|
|
295
300
|
btx_message_iterator_t *message_iterator_private_data =
|
|
296
|
-
bt_self_message_iterator_get_data(
|
|
301
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
302
|
+
self_message_iterator);
|
|
297
303
|
|
|
298
304
|
switch (message_iterator_private_data->state) {
|
|
299
305
|
case BTX_FILTER_STATE_INITIALIZING:
|
|
@@ -334,9 +340,11 @@ filter_initialize(bt_self_component_filter *self_component_filter,
|
|
|
334
340
|
const bt_value *params, void *initialize_method_data) {
|
|
335
341
|
|
|
336
342
|
/* Allocate a private data structure */
|
|
337
|
-
common_data_t *common_data =
|
|
338
|
-
|
|
339
|
-
common_data->
|
|
343
|
+
common_data_t *common_data =
|
|
344
|
+
(common_data_t *)calloc(1, sizeof(common_data_t));
|
|
345
|
+
common_data->static_callbacks =
|
|
346
|
+
(static_callbacks_t *)calloc(1, sizeof(static_callbacks_t));
|
|
347
|
+
common_data->btx_params = (btx_params_t *)calloc(1, sizeof(btx_params_t));
|
|
340
348
|
common_data->params = params;
|
|
341
349
|
|
|
342
350
|
/* Read parameters */
|
|
@@ -346,8 +354,7 @@ filter_initialize(bt_self_component_filter *self_component_filter,
|
|
|
346
354
|
/* Register User Callbacks */
|
|
347
355
|
btx_register_usr_callbacks((void *)common_data);
|
|
348
356
|
/* Call initialize_processing*/
|
|
349
|
-
btx_call_callbacks_initialize_component(
|
|
350
|
-
&common_data->usr_data);
|
|
357
|
+
btx_call_callbacks_initialize_component(common_data, &common_data->usr_data);
|
|
351
358
|
/* Call read callbacks */
|
|
352
359
|
btx_call_callbacks_read_params(common_data, common_data->usr_data,
|
|
353
360
|
common_data->btx_params);
|
|
@@ -427,10 +434,10 @@ filter_message_iterator_initialize(
|
|
|
427
434
|
bt_self_component_port_output *self_port_output) {
|
|
428
435
|
/* Allocate a private data structure */
|
|
429
436
|
btx_message_iterator_t *message_iterator_private_data =
|
|
430
|
-
calloc(1, sizeof(btx_message_iterator_t));
|
|
437
|
+
(btx_message_iterator_t *)calloc(1, sizeof(btx_message_iterator_t));
|
|
431
438
|
|
|
432
439
|
/* Retrieve the component's private data from its user data */
|
|
433
|
-
common_data_t *common_data = bt_self_component_get_data(
|
|
440
|
+
common_data_t *common_data = (common_data_t *)bt_self_component_get_data(
|
|
434
441
|
bt_self_message_iterator_borrow_component(self_message_iterator));
|
|
435
442
|
|
|
436
443
|
/* Save a link to the self_message_iterator */
|
|
@@ -470,7 +477,7 @@ filter_message_iterator_initialize(
|
|
|
470
477
|
}
|
|
471
478
|
|
|
472
479
|
static void filter_finalize(bt_self_component_filter *self_component_filter) {
|
|
473
|
-
common_data_t *common_data = bt_self_component_get_data(
|
|
480
|
+
common_data_t *common_data = (common_data_t *)bt_self_component_get_data(
|
|
474
481
|
bt_self_component_filter_as_self_component(self_component_filter));
|
|
475
482
|
|
|
476
483
|
/* Finalize Component */
|
|
@@ -494,7 +501,8 @@ static void filter_message_iterator_finalize(
|
|
|
494
501
|
bt_self_message_iterator *self_message_iterator) {
|
|
495
502
|
/* Retrieve our private data from the message iterator's user data */
|
|
496
503
|
btx_message_iterator_t *message_iterator_private_data =
|
|
497
|
-
bt_self_message_iterator_get_data(
|
|
504
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
505
|
+
self_message_iterator);
|
|
498
506
|
|
|
499
507
|
{
|
|
500
508
|
struct el *elt, *tmp;
|
data/template/sink.c.erb
CHANGED
|
@@ -19,7 +19,7 @@ sink_consume(bt_self_component_sink *self_component_sink) {
|
|
|
19
19
|
|
|
20
20
|
/* Retrieve our private data from the component's user data */
|
|
21
21
|
/* This containt user data and the message iterator */
|
|
22
|
-
common_data_t *common_data = bt_self_component_get_data(
|
|
22
|
+
common_data_t *common_data = (common_data_t *)bt_self_component_get_data(
|
|
23
23
|
bt_self_component_sink_as_self_component(self_component_sink));
|
|
24
24
|
|
|
25
25
|
/* Consume a batch of messages from the upstream message iterator */
|
|
@@ -82,9 +82,11 @@ sink_initialize(bt_self_component_sink *self_component_sink,
|
|
|
82
82
|
bt_self_component_sink_configuration *configuration,
|
|
83
83
|
const bt_value *params, void *initialize_method_data) {
|
|
84
84
|
/* Allocate a private data structure */
|
|
85
|
-
common_data_t *common_data =
|
|
86
|
-
|
|
87
|
-
common_data->
|
|
85
|
+
common_data_t *common_data =
|
|
86
|
+
(common_data_t *)calloc(1, sizeof(common_data_t));
|
|
87
|
+
common_data->static_callbacks =
|
|
88
|
+
(static_callbacks_t *)calloc(1, sizeof(static_callbacks_t));
|
|
89
|
+
common_data->btx_params = (btx_params_t *)calloc(1, sizeof(btx_params_t));
|
|
88
90
|
common_data->params = params;
|
|
89
91
|
|
|
90
92
|
/* Read parameters */
|
|
@@ -94,8 +96,7 @@ sink_initialize(bt_self_component_sink *self_component_sink,
|
|
|
94
96
|
/* Register User Callbacks */
|
|
95
97
|
btx_register_usr_callbacks((void *)common_data);
|
|
96
98
|
/* Call initialize_processing*/
|
|
97
|
-
btx_call_callbacks_initialize_component(
|
|
98
|
-
&common_data->usr_data);
|
|
99
|
+
btx_call_callbacks_initialize_component(common_data, &common_data->usr_data);
|
|
99
100
|
/* Call read callbacks */
|
|
100
101
|
btx_call_callbacks_read_params(common_data, common_data->usr_data,
|
|
101
102
|
common_data->btx_params);
|
|
@@ -118,7 +119,7 @@ sink_initialize(bt_self_component_sink *self_component_sink,
|
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
static void sink_finalize(bt_self_component_sink *self_component_sink) {
|
|
121
|
-
common_data_t *common_data = bt_self_component_get_data(
|
|
122
|
+
common_data_t *common_data = (common_data_t *)bt_self_component_get_data(
|
|
122
123
|
bt_self_component_sink_as_self_component(self_component_sink));
|
|
123
124
|
|
|
124
125
|
/* Finalize Component */
|
|
@@ -145,7 +146,7 @@ static void sink_finalize(bt_self_component_sink *self_component_sink) {
|
|
|
145
146
|
static bt_component_class_sink_graph_is_configured_method_status
|
|
146
147
|
sink_graph_is_configured(bt_self_component_sink *self_component_sink) {
|
|
147
148
|
/* Retrieve our private data from the component's user data */
|
|
148
|
-
common_data_t *common_data = bt_self_component_get_data(
|
|
149
|
+
common_data_t *common_data = (common_data_t *)bt_self_component_get_data(
|
|
149
150
|
bt_self_component_sink_as_self_component(self_component_sink));
|
|
150
151
|
|
|
151
152
|
/* Borrow our unique port */
|
data/template/source.c.erb
CHANGED
|
@@ -23,7 +23,11 @@ source_message_iterator_next(bt_self_message_iterator *self_message_iterator,
|
|
|
23
23
|
|
|
24
24
|
/* Retrieve our private data from the message iterator's user data */
|
|
25
25
|
btx_message_iterator_t *message_iterator_private_data =
|
|
26
|
-
bt_self_message_iterator_get_data(
|
|
26
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
27
|
+
self_message_iterator);
|
|
28
|
+
|
|
29
|
+
// Avoid C++ crosses initialization warning
|
|
30
|
+
btx_source_status_t status;
|
|
27
31
|
|
|
28
32
|
/* When you return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_END, you must
|
|
29
33
|
* not put any message into the message array */
|
|
@@ -46,7 +50,7 @@ source_message_iterator_next(bt_self_message_iterator *self_message_iterator,
|
|
|
46
50
|
return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_OK;
|
|
47
51
|
}
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
status = BTX_SOURCE_END;
|
|
50
54
|
|
|
51
55
|
btx_call_callbacks_push_usr_messages(
|
|
52
56
|
message_iterator_private_data->common_data,
|
|
@@ -85,9 +89,11 @@ source_initialize(bt_self_component_source *self_component_source,
|
|
|
85
89
|
bt_self_component_source_configuration *configuration,
|
|
86
90
|
const bt_value *params, void *initialize_method_data) {
|
|
87
91
|
/* Allocate a private data structure */
|
|
88
|
-
common_data_t *common_data =
|
|
89
|
-
|
|
90
|
-
common_data->
|
|
92
|
+
common_data_t *common_data =
|
|
93
|
+
(common_data_t *)calloc(1, sizeof(common_data_t));
|
|
94
|
+
common_data->static_callbacks =
|
|
95
|
+
(static_callbacks_t *)calloc(1, sizeof(static_callbacks_t));
|
|
96
|
+
common_data->btx_params = (btx_params_t *)calloc(1, sizeof(btx_params_t));
|
|
91
97
|
common_data->params = params;
|
|
92
98
|
|
|
93
99
|
/* Read parameters */
|
|
@@ -97,8 +103,7 @@ source_initialize(bt_self_component_source *self_component_source,
|
|
|
97
103
|
/* Register User Callbacks */
|
|
98
104
|
btx_register_usr_callbacks((void *)common_data);
|
|
99
105
|
/* Call initialize_processing*/
|
|
100
|
-
btx_call_callbacks_initialize_component(
|
|
101
|
-
&common_data->usr_data);
|
|
106
|
+
btx_call_callbacks_initialize_component(common_data, &common_data->usr_data);
|
|
102
107
|
/* Call read callbacks */
|
|
103
108
|
btx_call_callbacks_read_params(common_data, common_data->usr_data,
|
|
104
109
|
common_data->btx_params);
|
|
@@ -142,12 +147,12 @@ source_message_iterator_initialize(
|
|
|
142
147
|
bt_self_component_port_output *self_port) {
|
|
143
148
|
/* Allocate a private data structure */
|
|
144
149
|
btx_message_iterator_t *message_iterator_private_data =
|
|
145
|
-
calloc(1, sizeof(btx_message_iterator_t));
|
|
150
|
+
(btx_message_iterator_t *)calloc(1, sizeof(btx_message_iterator_t));
|
|
146
151
|
|
|
147
152
|
message_iterator_private_data->state = BTX_SOURCE_STATE_INITIALIZING;
|
|
148
153
|
|
|
149
154
|
/* Retrieve the component's private data from its user data */
|
|
150
|
-
common_data_t *common_data = bt_self_component_get_data(
|
|
155
|
+
common_data_t *common_data = (common_data_t *)bt_self_component_get_data(
|
|
151
156
|
bt_self_message_iterator_borrow_component(self_message_iterator));
|
|
152
157
|
|
|
153
158
|
/* Save a link to the self_message_iterator */
|
|
@@ -164,7 +169,7 @@ source_message_iterator_initialize(
|
|
|
164
169
|
}
|
|
165
170
|
|
|
166
171
|
static void source_finalize(bt_self_component_source *self_component_source) {
|
|
167
|
-
common_data_t *common_data = bt_self_component_get_data(
|
|
172
|
+
common_data_t *common_data = (common_data_t *)bt_self_component_get_data(
|
|
168
173
|
bt_self_component_source_as_self_component(self_component_source));
|
|
169
174
|
|
|
170
175
|
/* Finalize Component */
|
|
@@ -194,7 +199,8 @@ static void source_message_iterator_finalize(
|
|
|
194
199
|
bt_self_message_iterator *self_message_iterator) {
|
|
195
200
|
/* Retrieve our private data from the message iterator's user data */
|
|
196
201
|
btx_message_iterator_t *message_iterator_private_data =
|
|
197
|
-
bt_self_message_iterator_get_data(
|
|
202
|
+
(btx_message_iterator_t *)bt_self_message_iterator_get_data(
|
|
203
|
+
self_message_iterator);
|
|
198
204
|
|
|
199
205
|
struct el *elt, *tmp;
|
|
200
206
|
DL_FOREACH_SAFE(message_iterator_private_data->pool, elt, tmp) {
|
data/template/upstream.c.erb
CHANGED
|
@@ -37,7 +37,8 @@ static void btx_dispatch_<%= dispatcher.name_sanitized %>(
|
|
|
37
37
|
{
|
|
38
38
|
if (callbacks-><%= dispatch_type.id %>) {
|
|
39
39
|
void **_p = NULL;
|
|
40
|
-
while ((
|
|
40
|
+
while ((
|
|
41
|
+
_p = (void **)utarray_next(callbacks-><%= dispatch_type.id %>, _p))) {
|
|
41
42
|
(*((<%= dispatch_type.name_sanitized %>_callback_f **)(_p)))(
|
|
42
43
|
(void *)common_data,
|
|
43
44
|
common_data
|
|
@@ -66,7 +67,7 @@ void btx_generic_register_callback_<%= dispatcher.name_sanitized %>(
|
|
|
66
67
|
s = (name_to_dispatcher_t *)malloc(sizeof(name_to_dispatcher_t));
|
|
67
68
|
s->name = "<%= dispatcher.name %>";
|
|
68
69
|
s->dispatcher = (void *)&btx_dispatch_<%= dispatcher.name_sanitized %>;
|
|
69
|
-
s->callbacks = calloc(1, sizeof(callbacks_t));
|
|
70
|
+
s->callbacks = (callbacks_t *)calloc(1, sizeof(callbacks_t));
|
|
70
71
|
// 2. Register it
|
|
71
72
|
HASH_ADD_KEYPTR(hh, *name_to_dispatcher, s->name, strlen(s->name), s);
|
|
72
73
|
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metababel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Applencourt
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2023-
|
|
13
|
+
date: 2023-11-07 00:00:00.000000000 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
description:
|
|
16
16
|
email:
|
|
@@ -57,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
58
|
version: '0'
|
|
59
59
|
requirements: []
|
|
60
|
-
|
|
61
|
-
rubygems_version: 2.7.6.3
|
|
60
|
+
rubygems_version: 3.3.3
|
|
62
61
|
signing_key:
|
|
63
62
|
specification_version: 4
|
|
64
63
|
summary: Helper for creation Babeltrace plugins
|