diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index ef49e9370b2..4c58ccc6427 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -888,12 +888,20 @@ check_irq_entry(struct trace_iterator *iter, u32 flags, | |||
888 | unsigned long addr, int depth) | 888 | unsigned long addr, int depth) |
889 | { | 889 | { |
890 | int cpu = iter->cpu; | 890 | int cpu = iter->cpu; |
891 | int *depth_irq; | ||
891 | struct fgraph_data *data = iter->private; | 892 | struct fgraph_data *data = iter->private; |
892 | int *depth_irq = &(per_cpu_ptr(data->cpu_data, cpu)->depth_irq); | ||
893 | 893 | ||
894 | if (flags & TRACE_GRAPH_PRINT_IRQS) | 894 | /* |
895 | * If we are either displaying irqs, or we got called as | ||
896 | * a graph event and private data does not exist, | ||
897 | * then we bypass the irq check. | ||
898 | */ | ||
899 | if ((flags & TRACE_GRAPH_PRINT_IRQS) || | ||
900 | (!data)) | ||
895 | return 0; | 901 | return 0; |
896 | 902 | ||
903 | depth_irq = &(per_cpu_ptr(data->cpu_data, cpu)->depth_irq); | ||
904 | |||
897 | /* | 905 | /* |
898 | * We are inside the irq code | 906 | * We are inside the irq code |
899 | */ | 907 | */ |
@@ -926,12 +934,20 @@ static int | |||
926 | check_irq_return(struct trace_iterator *iter, u32 flags, int depth) | 934 | check_irq_return(struct trace_iterator *iter, u32 flags, int depth) |
927 | { | 935 | { |
928 | int cpu = iter->cpu; | 936 | int cpu = iter->cpu; |
937 | int *depth_irq; | ||
929 | struct fgraph_data *data = iter->private; | 938 | struct fgraph_data *data = iter->private; |
930 | int *depth_irq = &(per_cpu_ptr(data->cpu_data, cpu)->depth_irq); | ||
931 | 939 | ||
932 | if (flags & TRACE_GRAPH_PRINT_IRQS) | 940 | /* |
941 | * If we are either displaying irqs, or we got called as | ||
942 | * a graph event and private data does not exist, | ||
943 | * then we bypass the irq check. | ||
944 | */ | ||
945 | if ((flags & TRACE_GRAPH_PRINT_IRQS) || | ||
946 | (!data)) | ||
933 | return 0; | 947 | return 0; |
934 | 948 | ||
949 | depth_irq = &(per_cpu_ptr(data->cpu_data, cpu)->depth_irq); | ||
950 | |||
935 | /* | 951 | /* |
936 | * We are not inside the irq code. | 952 | * We are not inside the irq code. |
937 | */ | 953 | */ |