tracing: Remove special traces
[firefly-linux-kernel-4.4.55.git] / kernel / trace / trace.c
index 55e48511d7c8ea8292b70dbd7cbcec43dc0c10b1..d9a4aa02c3842367ece8f59b484803713a0d8073 100644 (file)
@@ -1331,61 +1331,6 @@ static void __trace_userstack(struct trace_array *tr, unsigned long flags)
 
 #endif /* CONFIG_STACKTRACE */
 
-static void
-ftrace_trace_special(void *__tr,
-                    unsigned long arg1, unsigned long arg2, unsigned long arg3,
-                    int pc)
-{
-       struct ftrace_event_call *call = &event_special;
-       struct ring_buffer_event *event;
-       struct trace_array *tr = __tr;
-       struct ring_buffer *buffer = tr->buffer;
-       struct special_entry *entry;
-
-       event = trace_buffer_lock_reserve(buffer, TRACE_SPECIAL,
-                                         sizeof(*entry), 0, pc);
-       if (!event)
-               return;
-       entry   = ring_buffer_event_data(event);
-       entry->arg1                     = arg1;
-       entry->arg2                     = arg2;
-       entry->arg3                     = arg3;
-
-       if (!filter_check_discard(call, entry, buffer, event))
-               trace_buffer_unlock_commit(buffer, event, 0, pc);
-}
-
-void
-__trace_special(void *__tr, void *__data,
-               unsigned long arg1, unsigned long arg2, unsigned long arg3)
-{
-       ftrace_trace_special(__tr, arg1, arg2, arg3, preempt_count());
-}
-
-void
-ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3)
-{
-       struct trace_array *tr = &global_trace;
-       struct trace_array_cpu *data;
-       unsigned long flags;
-       int cpu;
-       int pc;
-
-       if (tracing_disabled)
-               return;
-
-       pc = preempt_count();
-       local_irq_save(flags);
-       cpu = raw_smp_processor_id();
-       data = tr->data[cpu];
-
-       if (likely(atomic_inc_return(&data->disabled) == 1))
-               ftrace_trace_special(tr, arg1, arg2, arg3, pc);
-
-       atomic_dec(&data->disabled);
-       local_irq_restore(flags);
-}
-
 /**
  * trace_vbprintk - write binary msg to tracing buffer
  *
@@ -1404,7 +1349,6 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
        struct bprint_entry *entry;
        unsigned long flags;
        int disable;
-       int resched;
        int cpu, len = 0, size, pc;
 
        if (unlikely(tracing_selftest_running || tracing_disabled))
@@ -1414,7 +1358,7 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
        pause_graph_tracing();
 
        pc = preempt_count();
-       resched = ftrace_preempt_disable();
+       preempt_disable_notrace();
        cpu = raw_smp_processor_id();
        data = tr->data[cpu];
 
@@ -1452,7 +1396,7 @@ out_unlock:
 
 out:
        atomic_dec_return(&data->disabled);
-       ftrace_preempt_enable(resched);
+       preempt_enable_notrace();
        unpause_graph_tracing();
 
        return len;
@@ -3666,7 +3610,6 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
                     size_t count, loff_t *ppos)
 {
        struct ftrace_buffer_info *info = filp->private_data;
-       unsigned int pos;
        ssize_t ret;
        size_t size;
 
@@ -3693,11 +3636,6 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
        if (ret < 0)
                return 0;
 
-       pos = ring_buffer_page_len(info->spare);
-
-       if (pos < PAGE_SIZE)
-               memset(info->spare + pos, 0, PAGE_SIZE - pos);
-
 read:
        size = PAGE_SIZE - info->read;
        if (size > count)
@@ -4361,9 +4299,6 @@ static __init int tracer_init_debugfs(void)
        trace_create_file("dyn_ftrace_total_info", 0444, d_tracer,
                        &ftrace_update_tot_cnt, &tracing_dyn_info_fops);
 #endif
-#ifdef CONFIG_SYSPROF_TRACER
-       init_tracer_sysprof_debugfs(d_tracer);
-#endif
 
        create_trace_options_dir();
 
@@ -4603,9 +4538,6 @@ __init static int tracer_alloc_buffers(void)
 
        register_tracer(&nop_trace);
        current_trace = &nop_trace;
-#ifdef CONFIG_BOOT_TRACER
-       register_tracer(&boot_tracer);
-#endif
        /* All seems OK, enable tracing */
        tracing_disabled = 0;