On Sat, Jul 19, 2014 at 5:02 AM, yangmin zhu wrote:
> Hi wang,
>
> On Fri, Jul 18, 2014 at 7:11 AM, D Wang wrote:
>> (Please copy dw...@janestreet.com on reply, as I am not subscribed to the
>> list.)
>>
>>
>> What's going wrong? Is there any workaround? If not, is this
>> something you would
The JSON output format is used to make it easier for other program
to parse strace's results. We need to modify the existing code to
use this basic framework to support the JSON output.
* defs.h: Add the interface of the JSON output framework.
* json.c(newfile): The Implmentation of JSON output fr
Hi all,
I had cleaned my patch and here I send them here for a discussion.
Patch list:
0001-JSON-Import-the-basic-JSON-output-framework.patch
0002-JSON-Add-j-option-to-support-JSON-output.patch
0003-JSON-Add-support-for-syscalls-in-io.c.patch
0004-JSON-Add-support-to-entering-exiting-of-syscall.pa
A special test file for syscalls in io.c, I tried to make the trace
results as stable as each time we execute the program.
* test/.gitignore: Add json_io.
* test/.Makefile: Add json_io.c to compile list.
* test/json_io.c(newfile): contain test cases for syscalls in io.c,
The only random number wou
Each syscall in the output will be a object in a single line.
The object has at least 3 attributes:"type", "name", "args" and "ret".
the vaule of "args" is an array and the output now only support string
as the basic value.
* syscall.c (trace_syscall_entering, trace_syscall_exiting):
Add support
Modify strace to use the JSON framework.
* Makefile.am: Add json.c to compile list.
* strace.c(tprintf, tprints, usage, init): Add a new option '-j'
in init(), Modify tprintf/tprints to use the basic JSON framework,
Add 2 new function:_tprintf/_tprints for the original output.
* strace.1: Add docu
We will do 3 compare to check the output:
1) Compare the Unmodified strace output to the Normal outputs;
2) Compare the JSON parsed results to the Normal outputs(ignore space);
3) Compare the JSON parsed results to the Unmodified strace outputs(ignore
space);
The 1st comparison should be identica
Modify all the syscalls in io.c to support JSON output.
There are mainly two kind modification to strace:
1) simply modify sys_* functions to use the JSON framework;
2) modify those format/detail funcitons(such as printfd, printlval etc..)
to use the JSON framework;
* io.c (sys_read/write, sys_rea
There are only 3 kind of '+++' signals in strace.
Note: Currently do NOT support the '/' in
JSON format. And this will make the those JSON lines invalid(or you can
just ignore these lines). Need to find a way to solve this problem.
* process.c(sys_exit): slightly reformat the code.
* syscall.c(tra