aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 15:21:02 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 16:01:13 -0400
commita4feb8348b62fe76a63cdb5569f5c920f5283c06 (patch)
tree029d0a5f2f581e823399df42d1bdb64bcbe64c0e /kernel/trace/trace.c
parent9fe068e92f6290e89e19adc521441661a1229f00 (diff)
ftrace: special stacktrace
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ca0d6ff74c11..c232d8248a09 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -808,29 +808,6 @@ ftrace(struct trace_array *tr, struct trace_array_cpu *data,
808 trace_function(tr, data, ip, parent_ip, flags); 808 trace_function(tr, data, ip, parent_ip, flags);
809} 809}
810 810
811void
812__trace_special(void *__tr, void *__data,
813 unsigned long arg1, unsigned long arg2, unsigned long arg3)
814{
815 struct trace_array_cpu *data = __data;
816 struct trace_array *tr = __tr;
817 struct trace_entry *entry;
818 unsigned long irq_flags;
819
820 raw_local_irq_save(irq_flags);
821 __raw_spin_lock(&data->lock);
822 entry = tracing_get_trace_entry(tr, data);
823 tracing_generic_entry_update(entry, 0);
824 entry->type = TRACE_SPECIAL;
825 entry->special.arg1 = arg1;
826 entry->special.arg2 = arg2;
827 entry->special.arg3 = arg3;
828 __raw_spin_unlock(&data->lock);
829 raw_local_irq_restore(irq_flags);
830
831 trace_wake_up();
832}
833
834void __trace_stack(struct trace_array *tr, 811void __trace_stack(struct trace_array *tr,
835 struct trace_array_cpu *data, 812 struct trace_array_cpu *data,
836 unsigned long flags, 813 unsigned long flags,
@@ -857,6 +834,30 @@ void __trace_stack(struct trace_array *tr,
857} 834}
858 835
859void 836void
837__trace_special(void *__tr, void *__data,
838 unsigned long arg1, unsigned long arg2, unsigned long arg3)
839{
840 struct trace_array_cpu *data = __data;
841 struct trace_array *tr = __tr;
842 struct trace_entry *entry;
843 unsigned long irq_flags;
844
845 raw_local_irq_save(irq_flags);
846 __raw_spin_lock(&data->lock);
847 entry = tracing_get_trace_entry(tr, data);
848 tracing_generic_entry_update(entry, 0);
849 entry->type = TRACE_SPECIAL;
850 entry->special.arg1 = arg1;
851 entry->special.arg2 = arg2;
852 entry->special.arg3 = arg3;
853 __trace_stack(tr, data, irq_flags, 4);
854 __raw_spin_unlock(&data->lock);
855 raw_local_irq_restore(irq_flags);
856
857 trace_wake_up();
858}
859
860void
860tracing_sched_switch_trace(struct trace_array *tr, 861tracing_sched_switch_trace(struct trace_array *tr,
861 struct trace_array_cpu *data, 862 struct trace_array_cpu *data,
862 struct task_struct *prev, 863 struct task_struct *prev,