On Friday 09 December 2016 09:11 AM, Steven Rostedt wrote:
On Fri, 9 Dec 2016 10:08:35 +0800
Dave Young <dyoung(a)redhat.com> wrote:
> Ccing Steven, see if he has some comments about the design.
Thanks!
[snip]
>> +int main(int argc, char *argv[])
>> +{
>> + char trace_dir[64];
>> + struct sigaction sterm, sprint;
>> + pthread_t tid;
>> + int i;
>> +
>> + if (argc >= 2 && strlen(argv[1]) < 64)
>> + strcpy(trace_dir, argv[1]);
>> + else
>> + strcpy(trace_dir, "/sys/kernel/debug/tracing/");
>> +
>> + if (argc >= 3 && strlen(argv[2]) < 64)
>> + strcpy(trace_info.log_path, argv[2]);
>> + else
>> + strcpy(trace_info.log_path, DEFAULT_LOG_PATH);
>> + strcpy(trace_info.trace_path, trace_dir);
>> + strcat(trace_info.trace_path, "trace_pipe");
Please don't parse the text files. Can you open up the per_cpu
trace_pipe_raw instead. I'm working on getting the parsing of the
Thanks Steve for your comment. Will use per_cpu/trace_pipe_raw, which
should be more convenient for the use case.
binary format into a library. Perhaps you folks can help. Due to some
Please let me know where can I contribute to it. I will be happy to do
it whenever I have some time out of my regular kdump/kexec work.
recent events I had to put off my latest work, but I'm hoping to
start
it up again at the beginning of 2017.
Look at the code within the Linux tree under tools/lib/traceevent. You
can also look at my trace-cmd code found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
The parsing library is becoming my top priority. It will make this tool
(and other tools) much more robust to kernel changes.
Sure, will have a look to these.
~Pratyush