trace_events.c (5939d45155bb405ab212ef82992a8695b35f6662) trace_events.c (b63db58e2fa5d6963db9c45df88e60060f0ff35f)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * event tracer
4 *
5 * Copyright (C) 2008 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
6 *
7 * - Added format output of fields of the trace point.
8 * This was based off of work by Tom Zanussi <tzanussi@gmail.com>.

--- 2538 unchanged lines hidden (view full) ---

2547 *mode = 0200;
2548 *fops = &event_inject_fops;
2549 return 1;
2550 }
2551#endif
2552 return 0;
2553}
2554
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * event tracer
4 *
5 * Copyright (C) 2008 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
6 *
7 * - Added format output of fields of the trace point.
8 * This was based off of work by Tom Zanussi <tzanussi@gmail.com>.

--- 2538 unchanged lines hidden (view full) ---

2547 *mode = 0200;
2548 *fops = &event_inject_fops;
2549 return 1;
2550 }
2551#endif
2552 return 0;
2553}
2554
2555/* The file is incremented on creation and freeing the enable file decrements it */
2556static void event_release(const char *name, void *data)
2557{
2558 struct trace_event_file *file = data;
2559
2560 event_file_put(file);
2561}
2562
2555static int
2556event_create_dir(struct eventfs_inode *parent, struct trace_event_file *file)
2557{
2558 struct trace_event_call *call = file->event_call;
2559 struct trace_array *tr = file->tr;
2560 struct eventfs_inode *e_events;
2561 struct eventfs_inode *ei;
2562 const char *name;
2563 int nr_entries;
2564 int ret;
2565 static struct eventfs_entry event_entries[] = {
2566 {
2567 .name = "enable",
2568 .callback = event_callback,
2563static int
2564event_create_dir(struct eventfs_inode *parent, struct trace_event_file *file)
2565{
2566 struct trace_event_call *call = file->event_call;
2567 struct trace_array *tr = file->tr;
2568 struct eventfs_inode *e_events;
2569 struct eventfs_inode *ei;
2570 const char *name;
2571 int nr_entries;
2572 int ret;
2573 static struct eventfs_entry event_entries[] = {
2574 {
2575 .name = "enable",
2576 .callback = event_callback,
2577 .release = event_release,
2569 },
2570 {
2571 .name = "filter",
2572 .callback = event_callback,
2573 },
2574 {
2575 .name = "trigger",
2576 .callback = event_callback,

--- 52 unchanged lines hidden (view full) ---

2629 file->ei = ei;
2630
2631 ret = event_define_fields(call);
2632 if (ret < 0) {
2633 pr_warn("Could not initialize trace point events/%s\n", name);
2634 return ret;
2635 }
2636
2578 },
2579 {
2580 .name = "filter",
2581 .callback = event_callback,
2582 },
2583 {
2584 .name = "trigger",
2585 .callback = event_callback,

--- 52 unchanged lines hidden (view full) ---

2638 file->ei = ei;
2639
2640 ret = event_define_fields(call);
2641 if (ret < 0) {
2642 pr_warn("Could not initialize trace point events/%s\n", name);
2643 return ret;
2644 }
2645
2646 /* Gets decremented on freeing of the "enable" file */
2647 event_file_get(file);
2648
2637 return 0;
2638}
2639
2640static void remove_event_from_tracers(struct trace_event_call *call)
2641{
2642 struct trace_event_file *file;
2643 struct trace_array *tr;
2644

--- 1731 unchanged lines hidden ---
2649 return 0;
2650}
2651
2652static void remove_event_from_tracers(struct trace_event_call *call)
2653{
2654 struct trace_event_file *file;
2655 struct trace_array *tr;
2656

--- 1731 unchanged lines hidden ---