[PATCH] debugfs: Add stub function for debugfs_create_automount().

2015-11-22 Thread Jiaxing Wang
Add stub for debugfs_create_automount() for when debugfs is not configured in. Signed-off-by: Jiaxing Wang --- include/linux/debugfs.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 19c066d..981e53a 100644 --- a/include/linux

[PATCH] debugfs: Add stub function for debugfs_create_automount().

2015-11-22 Thread Jiaxing Wang
Add stub for debugfs_create_automount() for when debugfs is not configured in. Signed-off-by: Jiaxing Wang <hello@gmail.com> --- include/linux/debugfs.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 19c066d..981e53a

[PATCH] tracing: Make tracing work when debugfs is not configured in

2015-11-06 Thread Jiaxing Wang
is not configured in and can manually mount tracefs. But return -ENODEV if debugfs is configured in but not initialized or failed to create automount point as that would break backward compatibility with older tools. Signed-off-by: Jiaxing Wang --- kernel/trace/trace.c | 4 +++- 1 file changed, 3 insertions

Re: [PATCH RESEND] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-11-06 Thread Jiaxing Wang
On Thu, Nov 05, 2015 at 10:54:32AM -0500, Steven Rostedt wrote: > On Thu, 5 Nov 2015 13:23:01 +0800 > Jiaxing Wang wrote: > > > > > - /* > > > > -* As there may still be users that expect the tracing > > > > -* files t

[PATCH] tracing: Make tracing work when debugfs is not configured in

2015-11-06 Thread Jiaxing Wang
is not configured in and can manually mount tracefs. But return -ENODEV if debugfs is configured in but not initialized or failed to create automount point as that would break backward compatibility with older tools. Signed-off-by: Jiaxing Wang <hello@gmail.com> --- kernel/trace/trace.c | 4 +++-

Re: [PATCH RESEND] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-11-06 Thread Jiaxing Wang
On Thu, Nov 05, 2015 at 10:54:32AM -0500, Steven Rostedt wrote: > On Thu, 5 Nov 2015 13:23:01 +0800 > Jiaxing Wang <hello@gmail.com> wrote: > > > > > - /* > > > > -* As there may still be users that expect the tracing > > > > -

Re: [PATCH RESEND] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-11-04 Thread Jiaxing Wang
On Wed, Nov 04, 2015 at 10:03:39AM -0500, Steven Rostedt wrote: > On Wed, 4 Nov 2015 09:11:18 +0800 > Jiaxing Wang wrote: > > > Currently tracing_init_dentry() returns -ENODEV when debugfs is not > > initialized, which causes tracefs not populated with tracing files and &

Re: [PATCH RESEND] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-11-04 Thread Jiaxing Wang
On Wed, Nov 04, 2015 at 10:03:39AM -0500, Steven Rostedt wrote: > On Wed, 4 Nov 2015 09:11:18 +0800 > Jiaxing Wang <hello@gmail.com> wrote: > > > Currently tracing_init_dentry() returns -ENODEV when debugfs is not > > initialized, which causes tracefs not p

[PATCH v2] tracing: Apply tracer specific options from kernel command line.

2015-11-03 Thread Jiaxing Wang
trace_boot_options_buf can be parsed again, a comma and a space is put back if they were replaced by strsep and strstrip respectively. Also make register_tracer() be __init to access the __init data, and in fact register_tracer is only called from __init code. Signed-off-by: Jiaxing Wang --- kernel/trace

[PATCH RESEND] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-11-03 Thread Jiaxing Wang
is initialized and get a populated tracefs. We also need to make global_trace.dir not NULL in order to pass the checks in tracing_get_dentry() and add_tracer_options(). Also added stub debugfs_create_automount() for when debugfs is not configured in. Signed-off-by: Jiaxing Wang --- include/linux

[PATCH v2] tracing: Apply tracer specific options from kernel command line.

2015-11-03 Thread Jiaxing Wang
trace_boot_options_buf can be parsed again, a comma and a space is put back if they were replaced by strsep and strstrip respectively. Also make register_tracer() be __init to access the __init data, and in fact register_tracer is only called from __init code. Signed-off-by: Jiaxing Wang <he

[PATCH RESEND] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-11-03 Thread Jiaxing Wang
is initialized and get a populated tracefs. We also need to make global_trace.dir not NULL in order to pass the checks in tracing_get_dentry() and add_tracer_options(). Also added stub debugfs_create_automount() for when debugfs is not configured in. Signed-off-by: Jiaxing Wang <hello@gmail.

Re: [for-next][PATCH 4/5] tracing: Check all tasks on each CPU when filtering pids

2015-10-30 Thread Jiaxing Wang
On Thu, Oct 29, 2015 at 03:07:58AM -0400, Steven Rostedt wrote: > static ssize_t > ftrace_event_pid_write(struct file *filp, const char __user *ubuf, > size_t cnt, loff_t *ppos) > @@ -1711,6 +1727,12 @@ ftrace_event_pid_write(struct file *filp, const char > __user *ubuf, >

Re: [for-next][PATCH 4/5] tracing: Check all tasks on each CPU when filtering pids

2015-10-30 Thread Jiaxing Wang
On Thu, Oct 29, 2015 at 03:07:58AM -0400, Steven Rostedt wrote: > static ssize_t > ftrace_event_pid_write(struct file *filp, const char __user *ubuf, > size_t cnt, loff_t *ppos) > @@ -1711,6 +1727,12 @@ ftrace_event_pid_write(struct file *filp, const char > __user *ubuf, >

Re: [PATCH 2/3] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-10-18 Thread Jiaxing Wang
Sorry for the last patch, please use this to add stub for debugfs_create_automount(). >From b3b877d8d9fd9795ea1055042039a272e47f4dc5 Mon Sep 17 00:00:00 2001 From: Jiaxing Wang Date: Mon, 19 Oct 2015 09:46:12 +0800 Subject: [PATCH] debugfs: Add stub function for debugfs_create_automount().

[PATCH 2/3] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-10-18 Thread Jiaxing Wang
is initialized and get a populated tracefs. We also need to make global_trace.dir not NULL in order to pass the checks in tracing_get_dentry() and add_tracer_options(). Signed-off-by: Jiaxing Wang --- kernel/trace/Kconfig | 1 - kernel/trace/trace.c | 29 + 2 files changed

[PATCH 3/3] tracing: Apply tracer specific options from kernel command line.

2015-10-18 Thread Jiaxing Wang
trace_boot_options_buf from overwritten by strsep() and strstrip() and can be parsed again, a copy is made for them to work on. Also make register_tracer() be __init to access the __init data, and in fact register_tracer is only called from __init code. Signed-off-by: Jiaxing Wang --- kernel/trace/trace.c

[PATCH 0/3] Some tracing fixes.

2015-10-18 Thread Jiaxing Wang
kernel parameter, like the following: ftrace=function ftrace_filter=kfree trace_options=func_stack_trace Jiaxing Wang (3): tracing: Update instance_rmdir() to use tracefs_remove_recursive. tracing: Make tracing work when debugfs is not compiled or initialized. tracing: Apply tracer

[PATCH 1/3] tracing: Update instance_rmdir() to use tracefs_remove_recursive.

2015-10-18 Thread Jiaxing Wang
Update instancd_rmdir to use tracefs_remove_recursive instead of debugfs_remove_recursive.This was left in the transition from debugfs to tracefs. Signed-off-by: Jiaxing Wang --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b

Re: [PATCH 2/3] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-10-18 Thread Jiaxing Wang
Sorry for the last patch, please use this to add stub for debugfs_create_automount(). >From b3b877d8d9fd9795ea1055042039a272e47f4dc5 Mon Sep 17 00:00:00 2001 From: Jiaxing Wang <hello@gmail.com> Date: Mon, 19 Oct 2015 09:46:12 +0800 Subject: [PATCH] debugfs: Add stub

[PATCH 0/3] Some tracing fixes.

2015-10-18 Thread Jiaxing Wang
kernel parameter, like the following: ftrace=function ftrace_filter=kfree trace_options=func_stack_trace Jiaxing Wang (3): tracing: Update instance_rmdir() to use tracefs_remove_recursive. tracing: Make tracing work when debugfs is not compiled or initialized. tracing: Apply tracer

[PATCH 1/3] tracing: Update instance_rmdir() to use tracefs_remove_recursive.

2015-10-18 Thread Jiaxing Wang
Update instancd_rmdir to use tracefs_remove_recursive instead of debugfs_remove_recursive.This was left in the transition from debugfs to tracefs. Signed-off-by: Jiaxing Wang <hello@gmail.com> --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 3/3] tracing: Apply tracer specific options from kernel command line.

2015-10-18 Thread Jiaxing Wang
trace_boot_options_buf from overwritten by strsep() and strstrip() and can be parsed again, a copy is made for them to work on. Also make register_tracer() be __init to access the __init data, and in fact register_tracer is only called from __init code. Signed-off-by: Jiaxing Wang <hello@gmail.

[PATCH 2/3] tracing: Make tracing work when debugfs is not compiled or initialized.

2015-10-18 Thread Jiaxing Wang
is initialized and get a populated tracefs. We also need to make global_trace.dir not NULL in order to pass the checks in tracing_get_dentry() and add_tracer_options(). Signed-off-by: Jiaxing Wang <hello@gmail.com> --- kernel/trace/Kconfig | 1 - kernel/trace/trace.

[PATCH 2/2] Correct documentation of ftrace_set_global_filter and ftrace_set_global_notrace

2014-04-20 Thread Jiaxing Wang
Signed-off-by: Jiaxing Wang --- kernel/trace/ftrace.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index e7e7302..57cdaba 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3644,8 +3644,7 @@ int

[PATCH 1/2] tracing/trace_stack:Skip 4 instead of 3 when using ftrace_ops_list_func

2014-04-20 Thread Jiaxing Wang
to remain static. Signed-off-by: Jiaxing Wang --- kernel/trace/ftrace.c | 5 + kernel/trace/trace.h | 1 + kernel/trace/trace_stack.c | 8 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1fd4b94..e7e7302 100644

[PATCH 0/2] Stack trace fix and ftrace documentation fixes

2014-04-20 Thread Jiaxing Wang
The first patch makes trace_stack to skip 4 instead of 3 function return addresses on the stack when ftrace_ops_list_func is used in ftrace, and added a function to check for this. The second correct the documentation of two functions in ftrace.c Jiaxing Wang (2): tracing/trace_stack:Skip 4

[PATCH 0/2] Stack trace fix and ftrace documentation fixes

2014-04-20 Thread Jiaxing Wang
The first patch makes trace_stack to skip 4 instead of 3 function return addresses on the stack when ftrace_ops_list_func is used in ftrace, and added a function to check for this. The second correct the documentation of two functions in ftrace.c Jiaxing Wang (2): tracing/trace_stack:Skip 4

[PATCH 2/2] Correct documentation of ftrace_set_global_filter and ftrace_set_global_notrace

2014-04-20 Thread Jiaxing Wang
Signed-off-by: Jiaxing Wang wangjiax...@insigma.com.cn --- kernel/trace/ftrace.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index e7e7302..57cdaba 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3644,8

[PATCH 1/2] tracing/trace_stack:Skip 4 instead of 3 when using ftrace_ops_list_func

2014-04-20 Thread Jiaxing Wang
to remain static. Signed-off-by: Jiaxing Wang wangjiax...@insigma.com.cn --- kernel/trace/ftrace.c | 5 + kernel/trace/trace.h | 1 + kernel/trace/trace_stack.c | 8 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c

Re: [PATCH] tracing:Do not profile dumpstack utilities to fix stack trace output

2014-04-19 Thread Jiaxing Wang
On 04/19/2014 11:18 PM, Steven Rostedt wrote: > On Sat, 19 Apr 2014 15:45:46 +0800 > Jiaxing Wang wrote: > >> When function_graph tracer is enabled, we get stack trace like this: >> >> DepthSize Location(88 entries) >> -

[PATCH] tracing:Do not profile dumpstack utilities to fix stack trace output

2014-04-19 Thread Jiaxing Wang
tion's 'return_to_handler' on the stack and resulting the wrong output above. To fix this, we can disable the profiling of dumpstack utilities. Signed-off-by: Jiaxing Wang --- arch/x86/kernel/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile

[PATCH] tracing:Do not profile dumpstack utilities to fix stack trace output

2014-04-19 Thread Jiaxing Wang
utilities. Signed-off-by: Jiaxing Wang wangjiax...@insigma.com.cn --- arch/x86/kernel/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index f4d9600..9dd8ce4 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile

Re: [PATCH] tracing:Do not profile dumpstack utilities to fix stack trace output

2014-04-19 Thread Jiaxing Wang
On 04/19/2014 11:18 PM, Steven Rostedt wrote: On Sat, 19 Apr 2014 15:45:46 +0800 Jiaxing Wang wangjiax...@insigma.com.cn wrote: When function_graph tracer is enabled, we get stack trace like this: DepthSize Location(88 entries) - 0

Re: [PATCH] seq_file: always update file->f_pos in seq_lseek()

2013-10-25 Thread Jiaxing Wang
On 10/25/2013 06:15 PM, Gu Zheng wrote: > This issue was first pointed out by Jiaxing Wang several months ago, but no > further comments: > https://lkml.org/lkml/2013/6/29/41 > > As we know pread() does not change f_pos, so after pread(), file->f_pos > and m->r

Re: [PATCH] seq_file: always update file-f_pos in seq_lseek()

2013-10-25 Thread Jiaxing Wang
On 10/25/2013 06:15 PM, Gu Zheng wrote: This issue was first pointed out by Jiaxing Wang several months ago, but no further comments: https://lkml.org/lkml/2013/6/29/41 As we know pread() does not change f_pos, so after pread(), file-f_pos and m-read_pos become different. And seq_lseek

Re: [PATCH] seq_file:update file->f_pos when lseek() to m->read_pos

2013-07-01 Thread Jiaxing Wang
On 07/01/2013 08:41 PM, fangdong wrote: > On 06/29/2013 05:11 AM, Jiaxing Wang wrote: >> After pread(), file->f_pos and m->read_pos get different, >> and lseek() to m->read_pos did not update file->f_pos, then >> a subsequent read may read from a wrong positio

Re: [PATCH] seq_file:update file-f_pos when lseek() to m-read_pos

2013-07-01 Thread Jiaxing Wang
On 07/01/2013 08:41 PM, fangdong wrote: On 06/29/2013 05:11 AM, Jiaxing Wang wrote: After pread(), file-f_pos and m-read_pos get different, and lseek() to m-read_pos did not update file-f_pos, then a subsequent read may read from a wrong position, the following program shows the problem

[PATCH] seq_file:update file->f_pos when lseek() to m->read_pos

2013-06-29 Thread Jiaxing Wang
+count, but this read from position 0*/ read(fd, str2, count); printf("read:%s\n", str2); Signed-off-by: Jiaxing Wang --- fs/seq_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/seq_file.c b/fs/seq_file.c index 774c1eb..4b22b26 100644 --- a/fs/se

[PATCH] seq_file:update file-f_pos when lseek() to m-read_pos

2013-06-29 Thread Jiaxing Wang
*/ read(fd, str2, count); printf(read:%s\n, str2); Signed-off-by: Jiaxing Wang hello@gmail.com --- fs/seq_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/seq_file.c b/fs/seq_file.c index 774c1eb..4b22b26 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c @@ -328,7