Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96fa2b50 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'tracing-core-for-linus' of...

Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (40 commits)
  tracing: Separate raw syscall from syscall tracer
  ring-buffer-benchmark: Add parameters to set produce/consumer priorities
  tracing, function tracer: Clean up strstrip() usage
  ring-buffer benchmark: Run producer/consumer threads at nice +19
  tracing: Remove the stale include/trace/power.h
  tracing: Only print objcopy version warning once from recordmcount
  tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
  ring-buffer: Move access to commit_page up into function used
  tracing: do not disable interrupts for trace_clock_local
  ring-buffer: Add multiple iterations between benchmark timestamps
  kprobes: Sanitize struct kretprobe_instance allocations
  tracing: Fix to use __always_unused attribute
  compiler: Introduce __always_unused
  tracing: Exit with error if a weak function is used in recordmcount.pl
  tracing: Move conditional into update_funcs() in recordmcount.pl
  tracing: Add regex for weak functions in recordmcount.pl
  tracing: Move mcount section search to front of loop in recordmcount.pl
  tracing: Fix objcopy revision check in recordmcount.pl
  tracing: Check absolute path of input file in recordmcount.pl
  tracing: Correct the check for number of arguments in recordmcount.pl
  ...
parents 7a797cdc b8007ef7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -778,6 +778,13 @@ and is between 256 and 4096 characters. It is defined in the file
			by the set_ftrace_notrace file in the debugfs
			tracing directory.

	ftrace_graph_filter=[function-list]
			[FTRACE] Limit the top level callers functions traced
			by the function graph tracer at boot up.
			function-list is a comma separated list of functions
			that can be changed at run time by the
			set_graph_function file in the debugfs tracing directory.

	gamecon.map[2|3]=
			[HW,JOY] Multisystem joystick and NES/SNES/PSX pad
			support via parallel port (up to 5 devices per port)
+11 −2
Original line number Diff line number Diff line
@@ -213,10 +213,19 @@ If you can't trace NMI functions, then skip this option.
<details to be filled>


HAVE_FTRACE_SYSCALLS
HAVE_SYSCALL_TRACEPOINTS
---------------------

<details to be filled>
You need very few things to get the syscalls tracing in an arch.

- Have a NR_syscalls variable in <asm/unistd.h> that provides the number
  of syscalls supported by the arch.
- Implement arch_syscall_addr() that resolves a syscall address from a
  syscall number.
- Support the TIF_SYSCALL_TRACEPOINT thread flags
- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace
  in the ptrace syscalls tracing path.
- Tag this arch as HAVE_SYSCALL_TRACEPOINTS.


HAVE_FTRACE_MCOUNT_RECORD
+1 −0
Original line number Diff line number Diff line
@@ -379,6 +379,7 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc
PHONY += scripts_basic
scripts_basic:
	$(Q)$(MAKE) $(build)=scripts/basic
	$(Q)rm -f .tmp_quiet_recordmcount

# To avoid any implicit rule to kick in, define an empty command.
scripts/basic/%: scripts_basic ;
+2 −65
Original line number Diff line number Diff line
@@ -203,73 +203,10 @@ unsigned long prepare_ftrace_return(unsigned long ip, unsigned long parent)

#ifdef CONFIG_FTRACE_SYSCALLS

extern unsigned long __start_syscalls_metadata[];
extern unsigned long __stop_syscalls_metadata[];
extern unsigned int sys_call_table[];

static struct syscall_metadata **syscalls_metadata;

struct syscall_metadata *syscall_nr_to_meta(int nr)
{
	if (!syscalls_metadata || nr >= NR_syscalls || nr < 0)
		return NULL;

	return syscalls_metadata[nr];
}

int syscall_name_to_nr(char *name)
{
	int i;

	if (!syscalls_metadata)
		return -1;
	for (i = 0; i < NR_syscalls; i++)
		if (syscalls_metadata[i])
			if (!strcmp(syscalls_metadata[i]->name, name))
				return i;
	return -1;
}

void set_syscall_enter_id(int num, int id)
{
	syscalls_metadata[num]->enter_id = id;
}

void set_syscall_exit_id(int num, int id)
unsigned long __init arch_syscall_addr(int nr)
{
	syscalls_metadata[num]->exit_id = id;
}

static struct syscall_metadata *find_syscall_meta(unsigned long syscall)
{
	struct syscall_metadata *start;
	struct syscall_metadata *stop;
	char str[KSYM_SYMBOL_LEN];

	start = (struct syscall_metadata *)__start_syscalls_metadata;
	stop = (struct syscall_metadata *)__stop_syscalls_metadata;
	kallsyms_lookup(syscall, NULL, NULL, NULL, str);

	for ( ; start < stop; start++) {
		if (start->name && !strcmp(start->name + 3, str + 3))
			return start;
	}
	return NULL;
}

static int __init arch_init_ftrace_syscalls(void)
{
	struct syscall_metadata *meta;
	int i;
	syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) * NR_syscalls,
				    GFP_KERNEL);
	if (!syscalls_metadata)
		return -ENOMEM;
	for (i = 0; i < NR_syscalls; i++) {
		meta = find_syscall_meta((unsigned long)sys_call_table[i]);
		syscalls_metadata[i] = meta;
	}
	return 0;
	return (unsigned long)sys_call_table[nr];
}
arch_initcall(arch_init_ftrace_syscalls);
#endif
+2 −5
Original line number Diff line number Diff line
@@ -1185,17 +1185,14 @@ END(ftrace_graph_caller)

.globl return_to_handler
return_to_handler:
	pushl $0
	pushl %eax
	pushl %ecx
	pushl %edx
	movl %ebp, %eax
	call ftrace_return_to_handler
	movl %eax, 0xc(%esp)
	movl %eax, %ecx
	popl %edx
	popl %ecx
	popl %eax
	ret
	jmp *%ecx
#endif

.section .rodata,"a"
Loading