diff options
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r-- | include/trace/ftrace.h | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 72a3b437b829..a822087857e9 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -382,20 +382,14 @@ static inline int ftrace_get_offsets_##call( \ | |||
382 | * | 382 | * |
383 | * NOTE: The insertion profile callback (ftrace_profile_<call>) is defined later | 383 | * NOTE: The insertion profile callback (ftrace_profile_<call>) is defined later |
384 | * | 384 | * |
385 | * static int ftrace_profile_enable_<call>(struct ftrace_event_call *event_call) | 385 | * static int ftrace_profile_enable_<call>(void) |
386 | * { | 386 | * { |
387 | * int ret = 0; | 387 | * return register_trace_<call>(ftrace_profile_<call>); |
388 | * | ||
389 | * if (!atomic_inc_return(&event_call->profile_count)) | ||
390 | * ret = register_trace_<call>(ftrace_profile_<call>); | ||
391 | * | ||
392 | * return ret; | ||
393 | * } | 388 | * } |
394 | * | 389 | * |
395 | * static void ftrace_profile_disable_<call>(struct ftrace_event_call *event_call) | 390 | * static void ftrace_profile_disable_<call>(void) |
396 | * { | 391 | * { |
397 | * if (atomic_add_negative(-1, &event->call->profile_count)) | 392 | * unregister_trace_<call>(ftrace_profile_<call>); |
398 | * unregister_trace_<call>(ftrace_profile_<call>); | ||
399 | * } | 393 | * } |
400 | * | 394 | * |
401 | */ | 395 | */ |
@@ -405,20 +399,14 @@ static inline int ftrace_get_offsets_##call( \ | |||
405 | \ | 399 | \ |
406 | static void ftrace_profile_##call(proto); \ | 400 | static void ftrace_profile_##call(proto); \ |
407 | \ | 401 | \ |
408 | static int ftrace_profile_enable_##call(struct ftrace_event_call *event_call) \ | 402 | static int ftrace_profile_enable_##call(void) \ |
409 | { \ | 403 | { \ |
410 | int ret = 0; \ | 404 | return register_trace_##call(ftrace_profile_##call); \ |
411 | \ | ||
412 | if (!atomic_inc_return(&event_call->profile_count)) \ | ||
413 | ret = register_trace_##call(ftrace_profile_##call); \ | ||
414 | \ | ||
415 | return ret; \ | ||
416 | } \ | 405 | } \ |
417 | \ | 406 | \ |
418 | static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | 407 | static void ftrace_profile_disable_##call(void) \ |
419 | { \ | 408 | { \ |
420 | if (atomic_add_negative(-1, &event_call->profile_count)) \ | 409 | unregister_trace_##call(ftrace_profile_##call); \ |
421 | unregister_trace_##call(ftrace_profile_##call); \ | ||
422 | } | 410 | } |
423 | 411 | ||
424 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 412 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |