Lines Matching defs:tracer
3 * ring buffer based function tracer
98 struct tracer *tracer;
112 * of the tracer is successful. But that is the only place that sets
710 * the irqsoff tracer. But it may be inaccurate due to races. If you
739 static struct tracer *trace_types __read_mostly;
1269 struct tracer *type;
1274 static int save_selftest(struct tracer *type)
1287 static int run_tracer_selftest(struct tracer *type)
1291 struct tracer *saved_tracer = tr->current_trace;
1298 * If a tracer registers early in boot up (before scheduling is
1306 pr_warn("Selftest for tracer %s skipped due to tracing disabled\n",
1312 * Run a selftest on this tracer.
1314 * tracer to be this tracer. The tracer can then run some
1316 * If we fail, we do not register this tracer.
1334 pr_info("Testing tracer %s: ", type->name);
1363 static int do_run_tracer_selftest(struct tracer *type)
1384 struct tracer *t, **last;
1394 pr_info("Running postponed tracer tests:\n");
1405 WARN(1, "tracer: %s failed selftest, disabling\n",
1425 static inline int do_run_tracer_selftest(struct tracer *type)
1431 static int add_tracer(struct trace_array *tr, struct tracer *t);
1449 * register_tracer - register a tracer with the ftrace system.
1450 * @type: the plugin for the tracer
1452 * Register a new plugin tracer.
1454 int __init register_tracer(struct tracer *type)
1457 struct tracer *t;
1471 pr_warn("Can not register tracer %s due to lockdown\n",
1488 /* store the tracer for __set_tracer_option */
1499 /* The tracer will still exist but without options */
1500 pr_warn("Failed to create tracer options for %s\n", type->name);
1517 printk(KERN_INFO "Starting tracer '%s'\n", type->name);
1518 /* Do we want this tracer to start on bootup? */
1525 disable_tracing_selftest("running a tracer");
1646 * tracing_start - quick start of the tracer
1649 * this will start the tracer back up.
1682 * tracing_stop - quick stop of the tracer
2053 * Note, we can still get here via blktrace, wakeup tracer
2750 * The current tracer is copied to avoid a global locking
2764 /* Close iter->trace before switching to the new current tracer */
2768 /* Reopen the new current tracer */
2944 struct tracer *type = iter->trace;
3299 seq_printf(m, "# tracer: %s\n", iter->trace->name);
3400 * tracing, other tracer may not need. Defer the allocation
3426 /* Notify the tracer early; before we stop tracing. */
3652 * A tracer is always available for the global array (toplevel)
3656 trace_ok_for_array(struct tracer *t, struct trace_array *tr)
3664 /* Find the next tracer that this trace array may use */
3665 static struct tracer *
3666 get_tracer_for_array(struct trace_array *tr, struct tracer *t)
3678 struct tracer *t = v;
3691 struct tracer *t;
3710 struct tracer *t = v;
3935 struct tracer *trace = tracer_flags->trace;
3950 /* Try to assign a tracer specific option */
3971 int trace_keep_overwrite(struct tracer *tracer, u64 mask, int set)
3973 if (tracer->enabled && (mask & TRACE_ITER(OVERWRITE)) && !set)
3993 /* Give the tracer a chance to approve the change */
4094 /* If no option could be set, test the specific tracer options */
4695 int tracer_init(struct tracer *t, struct trace_array *tr)
4755 * When a tracer needs a snapshot (one of the
4963 * This function is to be called when a tracer is about to be used.
4983 * Used to clear out the tracer before deletion of an instance.
5004 struct tracer *trace = NULL;
5022 if (strcmp(t->tracer->name, buf) == 0) {
5023 trace = t->tracer;
5055 /* If trace pipe files are being read, we can't change the tracer */
5091 tr->current_trace_flags = t->flags ? : t->tracer->flags;
7908 create_trace_option_files(struct trace_array *tr, struct tracer *tracer,
7936 tr->topts[tr->nr_topts].tracer = tracer;
7950 static int get_global_flags_val(struct tracer *tracer)
7955 if (t->tracer != tracer)
7966 struct tracer *tracer = t->tracer;
7967 struct tracer_flags *flags = t->flags ?: tracer->flags;
7972 /* Only add tracer options after update_tracer_options finish */
7976 return create_trace_option_files(tr, tracer, flags);
7979 static int add_tracer(struct trace_array *tr, struct tracer *tracer)
7993 if (!trace_ok_for_array(tracer, tr))
8000 t->tracer = tracer;
8004 flags = tracer->flags;
8006 if (!tracer->default_flags)
8010 * If the tracer defines default flags, it means the flags are
8017 *flags = *tracer->default_flags;
8018 flags->trace = tracer;
8024 int val = get_global_flags_val(tracer);
8239 * When a tracer needs a snapshot (one of the
8481 struct tracer *t;
9397 /* Did function tracer already get disabled? */
9853 MEM_FAIL(1, "tracer: failed to allocate ring buffer!\n");
9967 * The default tracer at boot buffer is an init section.
9969 * find the boot tracer, then clear it out, to prevent
9976 printk(KERN_INFO "ftrace bootup tracer '%s' not registered.\n",