diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-01-29 15:26:40 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-01-30 11:30:00 -0500 |
commit | e7996a9a77fc669387da43ff4823b91cc4872bd0 (patch) | |
tree | 617f0a128e222539d67e8cccc359f1bc4b984900 /kernel/trace/trace_functions.c | |
parent | b5fa635aab8f0d39a824c01991266a6d06f007fb (diff) | |
parent | d8a5b80568a9cb66810e75b182018e9edb68e8ff (diff) |
Merge tag v4.15 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
To resolve conflicts in:
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/qp.c
From patches merged into the -rc cycle. The conflict resolution matches
what linux-next has been carrying.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r-- | kernel/trace/trace_functions.c | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 27f7ad12c4b1..b611cd36e22d 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -154,6 +154,24 @@ function_trace_call(unsigned long ip, unsigned long parent_ip, | |||
154 | preempt_enable_notrace(); | 154 | preempt_enable_notrace(); |
155 | } | 155 | } |
156 | 156 | ||
157 | #ifdef CONFIG_UNWINDER_ORC | ||
158 | /* | ||
159 | * Skip 2: | ||
160 | * | ||
161 | * function_stack_trace_call() | ||
162 | * ftrace_call() | ||
163 | */ | ||
164 | #define STACK_SKIP 2 | ||
165 | #else | ||
166 | /* | ||
167 | * Skip 3: | ||
168 | * __trace_stack() | ||
169 | * function_stack_trace_call() | ||
170 | * ftrace_call() | ||
171 | */ | ||
172 | #define STACK_SKIP 3 | ||
173 | #endif | ||
174 | |||
157 | static void | 175 | static void |
158 | function_stack_trace_call(unsigned long ip, unsigned long parent_ip, | 176 | function_stack_trace_call(unsigned long ip, unsigned long parent_ip, |
159 | struct ftrace_ops *op, struct pt_regs *pt_regs) | 177 | struct ftrace_ops *op, struct pt_regs *pt_regs) |
@@ -180,15 +198,7 @@ function_stack_trace_call(unsigned long ip, unsigned long parent_ip, | |||
180 | if (likely(disabled == 1)) { | 198 | if (likely(disabled == 1)) { |
181 | pc = preempt_count(); | 199 | pc = preempt_count(); |
182 | trace_function(tr, ip, parent_ip, flags, pc); | 200 | trace_function(tr, ip, parent_ip, flags, pc); |
183 | /* | 201 | __trace_stack(tr, flags, STACK_SKIP, pc); |
184 | * skip over 5 funcs: | ||
185 | * __ftrace_trace_stack, | ||
186 | * __trace_stack, | ||
187 | * function_stack_trace_call | ||
188 | * ftrace_list_func | ||
189 | * ftrace_call | ||
190 | */ | ||
191 | __trace_stack(tr, flags, 5, pc); | ||
192 | } | 202 | } |
193 | 203 | ||
194 | atomic_dec(&data->disabled); | 204 | atomic_dec(&data->disabled); |
@@ -367,14 +377,27 @@ ftrace_traceoff(unsigned long ip, unsigned long parent_ip, | |||
367 | tracer_tracing_off(tr); | 377 | tracer_tracing_off(tr); |
368 | } | 378 | } |
369 | 379 | ||
380 | #ifdef CONFIG_UNWINDER_ORC | ||
370 | /* | 381 | /* |
371 | * Skip 4: | 382 | * Skip 3: |
383 | * | ||
384 | * function_trace_probe_call() | ||
385 | * ftrace_ops_assist_func() | ||
386 | * ftrace_call() | ||
387 | */ | ||
388 | #define FTRACE_STACK_SKIP 3 | ||
389 | #else | ||
390 | /* | ||
391 | * Skip 5: | ||
392 | * | ||
393 | * __trace_stack() | ||
372 | * ftrace_stacktrace() | 394 | * ftrace_stacktrace() |
373 | * function_trace_probe_call() | 395 | * function_trace_probe_call() |
374 | * ftrace_ops_list_func() | 396 | * ftrace_ops_assist_func() |
375 | * ftrace_call() | 397 | * ftrace_call() |
376 | */ | 398 | */ |
377 | #define STACK_SKIP 4 | 399 | #define FTRACE_STACK_SKIP 5 |
400 | #endif | ||
378 | 401 | ||
379 | static __always_inline void trace_stack(struct trace_array *tr) | 402 | static __always_inline void trace_stack(struct trace_array *tr) |
380 | { | 403 | { |
@@ -384,7 +407,7 @@ static __always_inline void trace_stack(struct trace_array *tr) | |||
384 | local_save_flags(flags); | 407 | local_save_flags(flags); |
385 | pc = preempt_count(); | 408 | pc = preempt_count(); |
386 | 409 | ||
387 | __trace_stack(tr, flags, STACK_SKIP, pc); | 410 | __trace_stack(tr, flags, FTRACE_STACK_SKIP, pc); |
388 | } | 411 | } |
389 | 412 | ||
390 | static void | 413 | static void |