aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/trace/ftrace.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 9b7a989dcbcc..0fd06fef9fac 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -203,6 +203,10 @@
203#define __get_dynamic_array(field) \ 203#define __get_dynamic_array(field) \
204 ((void *)__entry + (__entry->__data_loc_##field & 0xffff)) 204 ((void *)__entry + (__entry->__data_loc_##field & 0xffff))
205 205
206#undef __get_dynamic_array_len
207#define __get_dynamic_array_len(field) \
208 ((__entry->__data_loc_##field >> 16) & 0xffff)
209
206#undef __get_str 210#undef __get_str
207#define __get_str(field) (char *)__get_dynamic_array(field) 211#define __get_str(field) (char *)__get_dynamic_array(field)
208 212
@@ -211,7 +215,7 @@
211 ({ \ 215 ({ \
212 void *__bitmask = __get_dynamic_array(field); \ 216 void *__bitmask = __get_dynamic_array(field); \
213 unsigned int __bitmask_size; \ 217 unsigned int __bitmask_size; \
214 __bitmask_size = (__entry->__data_loc_##field >> 16) & 0xffff; \ 218 __bitmask_size = __get_dynamic_array_len(field); \
215 ftrace_print_bitmask_seq(p, __bitmask, __bitmask_size); \ 219 ftrace_print_bitmask_seq(p, __bitmask, __bitmask_size); \
216 }) 220 })
217 221
@@ -636,6 +640,7 @@ static inline void ftrace_test_probe_##call(void) \
636#undef __print_symbolic 640#undef __print_symbolic
637#undef __print_hex 641#undef __print_hex
638#undef __get_dynamic_array 642#undef __get_dynamic_array
643#undef __get_dynamic_array_len
639#undef __get_str 644#undef __get_str
640#undef __get_bitmask 645#undef __get_bitmask
641 646
@@ -700,6 +705,10 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
700#define __get_dynamic_array(field) \ 705#define __get_dynamic_array(field) \
701 ((void *)__entry + (__entry->__data_loc_##field & 0xffff)) 706 ((void *)__entry + (__entry->__data_loc_##field & 0xffff))
702 707
708#undef __get_dynamic_array_len
709#define __get_dynamic_array_len(field) \
710 ((__entry->__data_loc_##field >> 16) & 0xffff)
711
703#undef __get_str 712#undef __get_str
704#define __get_str(field) (char *)__get_dynamic_array(field) 713#define __get_str(field) (char *)__get_dynamic_array(field)
705 714