Hi,
I have a metadata like this:

event {
        name = "register";
        id = 0;
        fields := struct {
                ascii contents[440];
        };
};

and I can get the length of the array if I have an event,

          const struct bt_definition *scope
            = bt_ctf_get_top_level_scope (event,
                                          BT_EVENT_FIELDS);
          const struct bt_definition *array
            = bt_ctf_get_field (event, scope, "contents");

          block_size
            = bt_ctf_get_array_len (bt_ctf_get_decl_from_def (array));

block_size is what I want.  However, how can I get the array length
without an event?  I looked into babeltrace source for a while, but
don't see any API on metadata.

-- 
Yao (齐尧)

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to