Skip to content

Commit

Permalink
Merge branches 'tracing/branch-tracer', 'tracing/fastboot', 'tracing/…
Browse files Browse the repository at this point in the history
…ftrace', 'tracing/function-return-tracer', 'tracing/power-tracer', 'tracing/powerpc', 'tracing/ring-buffer', 'tracing/stack-tracer' and 'tracing/urgent' into tracing/core
  • Loading branch information
Ingo Molnar committed Nov 24, 2008
9 parents 0429149 + 1d926f2 + 69bb54e + 65afa5e + cbe2f5a + 813b852 + 033601a + 958086d + fb91ee6 commit 6f893fb
Show file tree
Hide file tree
Showing 32 changed files with 1,047 additions and 151 deletions.
16 changes: 15 additions & 1 deletion Documentation/ftrace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ output. To see what is available, simply cat the file:

cat /debug/tracing/trace_options
print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \
noblock nostacktrace nosched-tree
noblock nostacktrace nosched-tree nouserstacktrace nosym-userobj

To disable one of the options, echo in the option prepended with "no".

Expand Down Expand Up @@ -378,6 +378,20 @@ Here are the available options:
When a trace is recorded, so is the stack of functions.
This allows for back traces of trace sites.

userstacktrace - This option changes the trace.
It records a stacktrace of the current userspace thread.

sym-userobj - when user stacktrace are enabled, look up which object the
address belongs to, and print a relative address
This is especially useful when ASLR is on, otherwise you don't
get a chance to resolve the address to object/file/line after the app is no
longer running

The lookup is performed when you read trace,trace_pipe,latency_trace. Example:

a.out-1623 [000] 40874.465068: /root/a.out[+0x480] <-/root/a.out[+0
x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]

sched-tree - TBD (any users??)


Expand Down
6 changes: 4 additions & 2 deletions Documentation/tracers/mmiotrace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ echo mmiotrace > /debug/tracing/current_tracer
$ cat /debug/tracing/trace_pipe > mydump.txt &
Start X or whatever.
$ echo "X is up" > /debug/tracing/trace_marker
$ echo none > /debug/tracing/current_tracer
$ echo nop > /debug/tracing/current_tracer
Check for lost events.


Expand Down Expand Up @@ -66,7 +66,7 @@ which action. It is recommended to place descriptive markers about what you
do.

Shut down mmiotrace (requires root privileges):
$ echo none > /debug/tracing/current_tracer
$ echo nop > /debug/tracing/current_tracer
The 'cat' process exits. If it does not, kill it by issuing 'fg' command and
pressing ctrl+c.

Expand All @@ -81,7 +81,9 @@ are:
$ cat /debug/tracing/trace_entries
gives you a number. Approximately double this number and write it back, for
instance:
$ echo 0 > /debug/tracing/tracing_enabled
$ echo 128000 > /debug/tracing/trace_entries
$ echo 1 > /debug/tracing/tracing_enabled
Then start again from the top.

If you are doing a trace for a driver project, e.g. Nouveau, you should also
Expand Down
14 changes: 13 additions & 1 deletion arch/powerpc/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@

#ifndef __ASSEMBLY__
extern void _mcount(void);
#endif

#ifdef CONFIG_DYNAMIC_FTRACE
static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
/* reloction of mcount call site is the same as the address */
return addr;
}

struct dyn_arch_ftrace {
struct module *mod;
};
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* __ASSEMBLY__ */

#endif

Expand Down
16 changes: 15 additions & 1 deletion arch/powerpc/include/asm/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,19 @@ struct mod_arch_specific {
#ifdef __powerpc64__
unsigned int stubs_section; /* Index of stubs section in module */
unsigned int toc_section; /* What section is the TOC? */
#else
#ifdef CONFIG_DYNAMIC_FTRACE
unsigned long toc;
unsigned long tramp;
#endif

#else /* powerpc64 */
/* Indices of PLT sections within module. */
unsigned int core_plt_section;
unsigned int init_plt_section;
#ifdef CONFIG_DYNAMIC_FTRACE
unsigned long tramp;
#endif
#endif /* powerpc64 */

/* List of BUG addresses, source line numbers and filenames */
struct list_head bug_list;
Expand Down Expand Up @@ -68,6 +76,12 @@ struct mod_arch_specific {
# endif /* MODULE */
#endif

#ifdef CONFIG_DYNAMIC_FTRACE
# ifdef MODULE
asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous");
# endif /* MODULE */
#endif


struct exception_table_entry;
void sort_ex_table(struct exception_table_entry *start,
Expand Down
Loading

0 comments on commit 6f893fb

Please sign in to comment.