search for: __get_typeid_

Displaying 2 results from an estimated 2 matches for "__get_typeid_".

2015 Aug 14
2
[LLVM RFC] Add llvm.typeid.for intrinsic
...e BPF output themself manually or use perf script or babeltrace script. Thank you. ----------------- EXAMPLE ----------------- extern void output(int id, void *ptr, int size); #define OUTPUT_STR(name) \ struct name { #define OUTPUT_STR_END(name) \ }; \ unsigned long long __get_typeid_##name(struct name *) asm ("llvm.typeid.for.p0struct."#name); \ static inline void output_##name(struct name *str) \ {\ output(__get_typeid_##name(str), str, sizeof(struct name));\ };\ static struct name __g_##name; OUTPUT_STR(mystr) int x; int y; int z;...
2015 Aug 12
3
llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
On 2015/8/12 12:57, Alexei Starovoitov wrote: > On Wed, Aug 12, 2015 at 10:34:43AM +0800, Wangnan (F) via llvm-dev wrote: >> Think about a program like this: >> >> struct strA { int a; } >> struct strB { int b; } >> int func() { >> struct strA a; >> struct strB b; >> >> a.a = 1; >> b.b = 2; >>