lkml.org 
[lkml]   [2015]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC PATCH 09/11] kprobes: core logic of eraly kprobes
Date

>
> This macro defines an array and a bitmap, not only declare them. In addition,
> the functions defined by it are used only in this specific .c file.
>
> If there are not only one .c files use it, I think patch 7 can be improved:
>
> #define DEFINE_EKPROBE_AREA(__t, __static) \
> __static __t __ek_##__name##_slots[NR_EARLY_KPROBES_SLOTS]; \
> __static unsigned long __ek_##__name##_bitmap[EARLY_KPROBES_BITMAP_SZ];
>
> #define DEFINE_EKPROBE_ALLOC_OPS(__t, __name, __static) \
> DEFINE_EKPROBE_AREA(__t, __static) \
> __DEFINE_EKPROBE_ALLOC_OPS(__t, __name) \
> static inline __t *ek_alloc_##__name(void) \
> { \
> ...
>
> In .h file(s):
> DEFINE_EKPROBE_ALLOC_OPS(struct early_kprobe_slot, early_kprobe, extern)
>
> In .c file:
> DEFINE_EKPROBE_AREA(__t, )
>
> What do you think?
>
Looks like rocket science;-)




\
 
 \ /
  Last update: 2015-01-08 03:41    [W:0.082 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site