Re: [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON

2017-11-30 Thread Steven Rostedt
On Thu, 30 Nov 2017 13:26:55 +0200 Vladislav Valtchev wrote: > I proposed die() because, by looking at the original code of read_proc(): > > static char read_proc(void) > { > char buf[1]; > int fd; > int n; > > fd = open(PROC_FILE, O_RDONLY); > if (fd < 0) >

Re: [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON

2017-11-30 Thread Vladislav Valtchev
On Wed, 2017-11-29 at 11:18 -0500, Steven Rostedt wrote: > > In other words, I expect a tool to behave like: > > "I don't know what is that, so I cannot take any decisions. > >Here's the detailed problem (err msg, data). Now only a human may help > > now". > > > > The other approach is inst

Re: [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON

2017-11-29 Thread Steven Rostedt
On Wed, 29 Nov 2017 16:00:54 +0200 Vladislav Valtchev wrote: > On Wed, 2017-11-29 at 07:57 -0500, Steven Rostedt wrote: > > > > Let's think about what the user wants. > > > > If you do a "trace-cmd stat" what are you looking for? You want to see > > what ftrace operations are available. Now let

Re: [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON

2017-11-29 Thread Vladislav Valtchev
On Wed, 2017-11-29 at 07:57 -0500, Steven Rostedt wrote: > > Let's think about what the user wants. > > If you do a "trace-cmd stat" what are you looking for? You want to see > what ftrace operations are available. Now let's say we do something > weird, or someone has some weird modified kernel,

Re: [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON

2017-11-29 Thread Steven Rostedt
On Thu, 23 Nov 2017 14:32:32 +0200 Vladislav Valtchev wrote: > Agree. > We might also add an if (!isdigit(buf)) die() before return, but I understand > that, on the other side, we might not need to check the kernel's behavior > this way. We might ultimately trust the kernel [every part of it] and

Re: [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON

2017-11-23 Thread Vladislav Valtchev
On Wed, 2017-11-22 at 14:50 -0500, Steven Rostedt wrote: > > I applied the first two. Small comments about this one. Thanks, Steven. > > > > > > +/* Stack tracer public functions */ > > +int is_stack_tracer_enabled(void); > > As this is now in the trace-cmd.h header, please rename it to: >

Re: [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON

2017-11-22 Thread Steven Rostedt
On Wed, 22 Nov 2017 20:02:02 +0200 "Vladislav Valtchev (VMware)" wrote: > trace-cmd stat is a handy way for users to see what tracing is currently going > on, but currently is does not say anything about the stack tracing. This > simple > patch makes the command to show a message when the stack