#1: kmem_kmalloc (5 payload members)
#2: kmem_kfree (2 payload members)
#3: sched_waking (4 payload members)
#4: sched_migrate_task (5 payload members)
#5: sched_stat_runtime (4 payload members)
#6: sched_wakeup (4 payload members)
#7: rcu_utilization (1 payload member)
#8: rcu_utilization (1 payload member)
#9: sched_switch (7 payload members)
#10: syscall_entry_write (3 payload members)
...
The sink component class implementation and the shared object plugin macros are in the same file, epitome.c:
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <babeltrace2/babeltrace.h>
 
struct epitome_out {
    
 
    
    uint64_t index;
};
 
static
        const bt_value *params, 
void *initialize_method_data)
 
{
    
    struct epitome_out *epitome_out = malloc(sizeof(*epitome_out));
 
    
    epitome_out->index = 1;
 
    
        epitome_out);
 
    
        "in", NULL, NULL);
 
}
 
static
{
    
 
    
    free(epitome_out);
}
 
static
{
    
 
    
            self_component_sink, 0);
 
    
        in_port, &epitome_out->message_iterator);
 
}
 
static
void print_message(
struct epitome_out *epitome_out, 
const bt_message *message)
 
{
    
        goto end;
    }
 
    
 
    
 
    
    printf("#%" PRIu64 ": %s (%" PRIu64 " payload member%s)\n",
        member_count, member_count == 1 ? "" : "s");
 
    
    epitome_out->index++;
 
end:
    return;
}
 
{
 
    
 
    
    uint64_t message_count;
            &message_count);
 
    switch (next_status) {
        
        goto end;
        goto end;
        goto end;
        goto end;
    default:
        break;
    }
 
    
    for (uint64_t i = 0; i < message_count; i++) {
        
 
        
        print_message(epitome_out, message);
 
        
    }
 
end:
    return status;
}
 
 
 
 
    epitome_out_initialize);
    epitome_out_graph_is_configured);
bt_message const  ** bt_message_array_const
Array of constant messages.
Definition types.h:196
bt_component_class_sink_consume_method_status
Status codes for bt_component_class_sink_consume_method.
Definition component-class-dev.h:503
bt_component_class_sink_graph_is_configured_method_status
Status codes for bt_component_class_sink_graph_is_configured_method.
Definition component-class-dev.h:828
bt_component_class_initialize_method_status
Status codes for bt_component_class_source_initialize_method, bt_component_class_filter_initialize_me...
Definition component-class-dev.h:881
@ BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_ERROR
User error.
Definition component-class-dev.h:532
@ BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_END
Sink component is finished processing.
Definition component-class-dev.h:514
@ BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_AGAIN
Try again.
Definition component-class-dev.h:520
@ BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_MEMORY_ERROR
Out of memory.
Definition component-class-dev.h:526
@ BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_OK
Success.
Definition component-class-dev.h:508
@ BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_OK
Success.
Definition component-class-dev.h:833
@ BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK
Success.
Definition component-class-dev.h:886
void bt_message_iterator_put_ref(const bt_message_iterator *message_iterator)
Decrements the reference count of the message iterator message_iterator.
bt_message_iterator_next_status bt_message_iterator_next(bt_message_iterator *message_iterator, bt_message_array_const *messages, uint64_t *count)
Returns the next messages of the message iterator message_iterator into the *messages array of size *...
bt_message_iterator_next_status
Status code for bt_message_iterator_next().
Definition message-iterator.h:383
struct bt_message_iterator bt_message_iterator
Message iterator.
Definition types.h:72
bt_message_iterator_create_from_sink_component_status bt_message_iterator_create_from_sink_component(bt_self_component_sink *self_component_sink, bt_self_component_port_input *port, bt_message_iterator **message_iterator)
Creates a message iterator on the input port port from the sink component self_component_sink,...
@ BT_MESSAGE_ITERATOR_NEXT_STATUS_END
End of iteration.
Definition message-iterator.h:394
@ BT_MESSAGE_ITERATOR_NEXT_STATUS_MEMORY_ERROR
Out of memory.
Definition message-iterator.h:406
@ BT_MESSAGE_ITERATOR_NEXT_STATUS_ERROR
Other error.
Definition message-iterator.h:412
@ BT_MESSAGE_ITERATOR_NEXT_STATUS_AGAIN
Try again.
Definition message-iterator.h:400
struct bt_message bt_message
Message.
Definition types.h:71
const bt_event * bt_message_event_borrow_event_const(const bt_message *message)
Borrows the event of the event message message (const version).
bt_message_type bt_message_get_type(const bt_message *message)
Returns the type enumerator of the message message.
void bt_message_put_ref(const bt_message *message)
Decrements the reference count of the message message.
@ BT_MESSAGE_TYPE_EVENT
Event message.
Definition message.h:997
#define BT_PLUGIN_MODULE()
Defines a plugin module.
Definition plugin-dev.h:347
#define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method)
Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the _plugin_id parameter set to auto,...
Definition plugin-dev.h:913
#define BT_PLUGIN(_name)
Alias of BT_PLUGIN_WITH_ID() with the _id parameter set to auto.
Definition plugin-dev.h:435
#define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method)
Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID() with the _plugin_id parameter set...
Definition plugin-dev.h:2341
#define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method)
Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID() with the _plugin_id parameter set t...
Definition plugin-dev.h:2203
#define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method)
Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID() with the _plugin_id para...
Definition plugin-dev.h:2296
struct bt_self_component_port_input bt_self_component_port_input
Self component input port.
Definition types.h:93
bt_self_component_add_port_status bt_self_component_sink_add_input_port(bt_self_component_sink *self_component, const char *name, void *user_data, bt_self_component_port_input **self_component_port)
Adds an input port named name and having the user data user_data to the sink component self_component...
struct bt_self_component_sink_configuration bt_self_component_sink_configuration
Self sink component configuration.
Definition types.h:97
static bt_self_component * bt_self_component_sink_as_self_component(bt_self_component_sink *self_component)
Upcasts the self sink component self_component to the common bt_self_component type.
Definition self-component.h:869
void * bt_self_component_get_data(const bt_self_component *self_component)
Returns the user data of the component self_component.
bt_self_component_port_input * bt_self_component_sink_borrow_input_port_by_index(bt_self_component_sink *self_component, uint64_t index)
Borrows the self component input port at index index from the sink component self_component.
void bt_self_component_set_data(bt_self_component *self_component, void *user_data)
Sets the user data of the component self_component to data.
struct bt_self_component_sink bt_self_component_sink
Self sink component.
Definition types.h:96
const char * bt_event_class_get_name(const bt_event_class *event_class)
Returns the name of the event class event_class.
struct bt_event_class bt_event_class
Event class.
Definition types.h:51
const bt_event_class * bt_event_borrow_class_const(const bt_event *event)
Borrows the class of the event event (const version).
const bt_field * bt_event_borrow_payload_field_const(const bt_event *event)
Borrows the payload field of the event event (const version).
struct bt_event bt_event
Event.
Definition types.h:50
uint64_t bt_field_class_structure_get_member_count(const bt_field_class *field_class)
Returns the number of members contained in the structure field class field_class.
const bt_field_class * bt_field_borrow_class_const(const bt_field *field)
Borrows the class of the field field (const version).
struct bt_field bt_field
Field.
Definition types.h:53
struct bt_value bt_value
Value.
Definition types.h:107