diff options
Diffstat (limited to 'include/trace/ftrace.h')
| -rw-r--r-- | include/trace/ftrace.h | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index a77f71a46dbe..1e681142f1da 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -18,9 +18,6 @@ | |||
| 18 | 18 | ||
| 19 | #include <linux/ftrace_event.h> | 19 | #include <linux/ftrace_event.h> |
| 20 | 20 | ||
| 21 | #undef TRACE_FORMAT | ||
| 22 | #define TRACE_FORMAT(call, proto, args, fmt) | ||
| 23 | |||
| 24 | #undef __array | 21 | #undef __array |
| 25 | #define __array(type, item, len) type item[len]; | 22 | #define __array(type, item, len) type item[len]; |
| 26 | 23 | ||
| @@ -62,9 +59,6 @@ | |||
| 62 | * | 59 | * |
| 63 | */ | 60 | */ |
| 64 | 61 | ||
| 65 | #undef TRACE_FORMAT | ||
| 66 | #define TRACE_FORMAT(call, proto, args, fmt) | ||
| 67 | |||
| 68 | #undef __array | 62 | #undef __array |
| 69 | #define __array(type, item, len) | 63 | #define __array(type, item, len) |
| 70 | 64 | ||
| @@ -298,16 +292,6 @@ ftrace_define_fields_##call(void) \ | |||
| 298 | * unregister_trace_<call>(ftrace_event_<call>); | 292 | * unregister_trace_<call>(ftrace_event_<call>); |
| 299 | * } | 293 | * } |
| 300 | * | 294 | * |
| 301 | * For those macros defined with TRACE_FORMAT: | ||
| 302 | * | ||
| 303 | * static struct ftrace_event_call __used | ||
| 304 | * __attribute__((__aligned__(4))) | ||
| 305 | * __attribute__((section("_ftrace_events"))) event_<call> = { | ||
| 306 | * .name = "<call>", | ||
| 307 | * .regfunc = ftrace_reg_event_<call>, | ||
| 308 | * .unregfunc = ftrace_unreg_event_<call>, | ||
| 309 | * } | ||
| 310 | * | ||
| 311 | * | 295 | * |
| 312 | * For those macros defined with TRACE_EVENT: | 296 | * For those macros defined with TRACE_EVENT: |
| 313 | * | 297 | * |
| @@ -417,56 +401,6 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *call) \ | |||
| 417 | #define _TRACE_PROFILE_INIT(call) | 401 | #define _TRACE_PROFILE_INIT(call) |
| 418 | #endif | 402 | #endif |
| 419 | 403 | ||
| 420 | #define _TRACE_FORMAT(call, proto, args, fmt) \ | ||
| 421 | static void ftrace_event_##call(proto) \ | ||
| 422 | { \ | ||
| 423 | event_trace_printk(_RET_IP_, #call ": " fmt); \ | ||
| 424 | } \ | ||
| 425 | \ | ||
| 426 | static int ftrace_reg_event_##call(void) \ | ||
| 427 | { \ | ||
| 428 | int ret; \ | ||
| 429 | \ | ||
| 430 | ret = register_trace_##call(ftrace_event_##call); \ | ||
| 431 | if (ret) \ | ||
| 432 | pr_info("event trace: Could not activate trace point " \ | ||
| 433 | "probe to " #call "\n"); \ | ||
| 434 | return ret; \ | ||
| 435 | } \ | ||
| 436 | \ | ||
| 437 | static void ftrace_unreg_event_##call(void) \ | ||
| 438 | { \ | ||
| 439 | unregister_trace_##call(ftrace_event_##call); \ | ||
| 440 | } \ | ||
| 441 | \ | ||
| 442 | static struct ftrace_event_call event_##call; \ | ||
| 443 | \ | ||
| 444 | static int ftrace_init_event_##call(void) \ | ||
| 445 | { \ | ||
| 446 | int id; \ | ||
| 447 | \ | ||
| 448 | id = register_ftrace_event(NULL); \ | ||
| 449 | if (!id) \ | ||
| 450 | return -ENODEV; \ | ||
| 451 | event_##call.id = id; \ | ||
| 452 | return 0; \ | ||
| 453 | } | ||
| 454 | |||
| 455 | #undef TRACE_FORMAT | ||
| 456 | #define TRACE_FORMAT(call, proto, args, fmt) \ | ||
| 457 | _TRACE_FORMAT(call, PARAMS(proto), PARAMS(args), PARAMS(fmt)) \ | ||
| 458 | _TRACE_PROFILE(call, PARAMS(proto), PARAMS(args)) \ | ||
| 459 | static struct ftrace_event_call __used \ | ||
| 460 | __attribute__((__aligned__(4))) \ | ||
| 461 | __attribute__((section("_ftrace_events"))) event_##call = { \ | ||
| 462 | .name = #call, \ | ||
| 463 | .system = __stringify(TRACE_SYSTEM), \ | ||
| 464 | .raw_init = ftrace_init_event_##call, \ | ||
| 465 | .regfunc = ftrace_reg_event_##call, \ | ||
| 466 | .unregfunc = ftrace_unreg_event_##call, \ | ||
| 467 | _TRACE_PROFILE_INIT(call) \ | ||
| 468 | } | ||
| 469 | |||
| 470 | #undef __entry | 404 | #undef __entry |
| 471 | #define __entry entry | 405 | #define __entry entry |
| 472 | 406 | ||
