[lttng-dev] how to generate CTF metadata
Dominik Taborsky
bremby at seznam.cz
Sun Mar 15 18:14:40 EDT 2015
On 03/15/2015 10:31 PM, Philippe Proulx wrote:
> On Sun, Mar 15, 2015 at 5:25 PM, Dominik Taborsky <bremby at seznam.cz> wrote:
>> Hello,
>>
>> I am working on a project that involves generating CTF metadata, but I am
>> unsure about how to proceed. I am not sure about how to get information
>> about types,
>
> What "types" are you talking about exactly? What are you intending to
> write to binary streams?
Oh, sorry for not specifying exactly: I mean any defined, non-standard
types. For example, when you do:
typedef uint32_t key_t;
typedef struct {
size_t len;
char *data;
} wire_data_t;
You use these types by their typedef'd name. Suppose then, you want to
trace a function like:
int do_work(key_t k, wire_data_t data);
Then how do you know what those types are without looking at the
typedefs? The runtime tracer does not have access to those header files.
And even if it did, there may be tons of layers of typedefs. You've got
to do this at runtime, which obviously leaves me with DWARF. Otherwise
I'd have to specify the type info myself before or after the trace.
So my main question is: how does the LTTng linux kernel module
understand all the types so it may describe them in the CTF metadata?
Dominik
>
> Phil
>
>> i.e. their size, signedness, alignment and possibly other. I
>> know this information can be gathered from DWARF. Is that the primary way to
>> do this? Is there any other, reasonable way? Can you point me at some code
>> that does this? How does the LTTng linux kernel module work?
>>
>> Thanks.
>>
>> Dominik
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
More information about the lttng-dev
mailing list