Skip to content

Commit 1dd7dcb

Browse files
committed
Merge tag 'trace-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "There was a lot of clean ups and minor fixes. One of those clean ups was to the trace_seq code. It also removed the return values to the trace_seq_*() functions and use trace_seq_has_overflowed() to see if the buffer filled up or not. This is similar to work being done to the seq_file code as well in another tree. Some of the other goodies include: - Added some "!" (NOT) logic to the tracing filter. - Fixed the frame pointer logic to the x86_64 mcount trampolines - Added the logic for dynamic trampolines on !CONFIG_PREEMPT systems. That is, the ftrace trampoline can be dynamically allocated and be called directly by functions that only have a single hook to them" * tag 'trace-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (55 commits) tracing: Truncated output is better than nothing tracing: Add additional marks to signal very large time deltas Documentation: describe trace_buf_size parameter more accurately tracing: Allow NOT to filter AND and OR clauses tracing: Add NOT to filtering logic ftrace/fgraph/x86: Have prepare_ftrace_return() take ip as first parameter ftrace/x86: Get rid of ftrace_caller_setup ftrace/x86: Have save_mcount_regs macro also save stack frames if needed ftrace/x86: Add macro MCOUNT_REG_SIZE for amount of stack used to save mcount regs ftrace/x86: Simplify save_mcount_regs on getting RIP ftrace/x86: Have save_mcount_regs store RIP in %rdi for first parameter ftrace/x86: Rename MCOUNT_SAVE_FRAME and add more detailed comments ftrace/x86: Move MCOUNT_SAVE_FRAME out of header file ftrace/x86: Have static tracing also use ftrace_caller_setup ftrace/x86: Have static function tracing always test for function graph kprobes: Add IPMODIFY flag to kprobe_ftrace_ops ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict kprobes/ftrace: Recover original IP if pre_handler doesn't change it tracing/trivial: Fix typos and make an int into a bool tracing: Deletion of an unnecessary check before iput() ...
2 parents b6da007 + 3558a5a commit 1dd7dcb

38 files changed

Lines changed: 1680 additions & 1312 deletions

‎Documentation/kernel-parameters.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3520,7 +3520,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
35203520
are saved.
35213521

35223522
trace_buf_size=nn[KMG]
3523-
[FTRACE] will set tracing buffer size.
3523+
[FTRACE] will set tracing buffer size on each cpu.
35243524

35253525
trace_event=[event-list]
35263526
[FTRACE] Set and start specified trace events in order

‎Documentation/trace/ftrace.txt‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ of ftrace. Here is a list of some of the key files:
234234
will be displayed on the same line as the function that
235235
is returning registers.
236236

237+
If the callback registered to be traced by a function with
238+
the "ip modify" attribute (thus the regs->ip can be changed),
239+
an 'I' will be displayed on the same line as the function that
240+
can be overridden.
241+
237242
function_profile_enabled:
238243

239244
When set it will enable all functions with either the function
@@ -680,9 +685,11 @@ The above is mostly meaningful for kernel developers.
680685
needs to be fixed to be only relative to the same CPU.
681686
The marks are determined by the difference between this
682687
current trace and the next trace.
683-
'!' - greater than preempt_mark_thresh (default 100)
684-
'+' - greater than 1 microsecond
685-
' ' - less than or equal to 1 microsecond.
688+
'$' - greater than 1 second
689+
'#' - greater than 1000 microsecond
690+
'!' - greater than 100 microsecond
691+
'+' - greater than 10 microsecond
692+
' ' - less than or equal to 10 microsecond.
686693

687694
The rest is the same as the 'trace' file.
688695

@@ -1951,6 +1958,8 @@ want, depending on your needs.
19511958

19521959
+ means that the function exceeded 10 usecs.
19531960
! means that the function exceeded 100 usecs.
1961+
# means that the function exceeded 1000 usecs.
1962+
$ means that the function exceeded 1 sec.
19541963

19551964

19561965
- The task/pid field displays the thread cmdline and pid which

‎arch/powerpc/kernel/ftrace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ void ftrace_replace_code(int enable)
449449
rec = ftrace_rec_iter_record(iter);
450450
ret = __ftrace_replace_code(rec, enable);
451451
if (ret) {
452-
ftrace_bug(ret, rec->ip);
452+
ftrace_bug(ret, rec);
453453
return;
454454
}
455455
}

‎arch/x86/include/asm/ftrace.h‎

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,6 @@
11
#ifndef _ASM_X86_FTRACE_H
22
#define _ASM_X86_FTRACE_H
33

4-
#ifdef __ASSEMBLY__
5-
6-
/* skip is set if the stack was already partially adjusted */
7-
.macro MCOUNT_SAVE_FRAME skip=0
8-
/*
9-
* We add enough stack to save all regs.
10-
*/
11-
subq $(SS+8-\skip), %rsp
12-
movq %rax, RAX(%rsp)
13-
movq %rcx, RCX(%rsp)
14-
movq %rdx, RDX(%rsp)
15-
movq %rsi, RSI(%rsp)
16-
movq %rdi, RDI(%rsp)
17-
movq %r8, R8(%rsp)
18-
movq %r9, R9(%rsp)
19-
/* Move RIP to its proper location */
20-
movq SS+8(%rsp), %rdx
21-
movq %rdx, RIP(%rsp)
22-
.endm
23-
24-
.macro MCOUNT_RESTORE_FRAME skip=0
25-
movq R9(%rsp), %r9
26-
movq R8(%rsp), %r8
27-
movq RDI(%rsp), %rdi
28-
movq RSI(%rsp), %rsi
29-
movq RDX(%rsp), %rdx
30-
movq RCX(%rsp), %rcx
31-
movq RAX(%rsp), %rax
32-
addq $(SS+8-\skip), %rsp
33-
.endm
34-
35-
#endif
36-
374
#ifdef CONFIG_FUNCTION_TRACER
385
#ifdef CC_USING_FENTRY
396
# define MCOUNT_ADDR ((long)(__fentry__))

0 commit comments

Comments
 (0)