GSOC 2015
Amish Mittal
amishmittal12 at gmail.com
Sat Mar 7 02:15:11 UTC 2015
hi Philippe Ombredanne
plz find attached example with this maIl
On Sat, Mar 7, 2015 at 7:26 AM, Amish Mittal <amishmittal12 at gmail.com>
wrote:
> hi Philippe Ombredanne
> i read last year's conversation , and i have created a small prototype
> of json output using -j option in argument list.
> https://github.com/amishasdf12/gsocStrace
>
> currently this works only with -T flag only. plz have a look on it and
> acknowledge me whether i am going in right direction
> so that i can start working on other flag options and if not then
> provide me some suggestion.
>
> thank yoy
> Amish Mittal
>
>
> On Fri, Mar 6, 2015 at 7:35 PM, Philippe Ombredanne <pombredanne at nexb.com>
> wrote:
>
>> On Fri, Mar 6, 2015 at 7:17 AM, Amish Mittal <amishmittal12 at gmail.com>
>> wrote:
>> > hi
>> > i am Amish Mittal sutdent of IIT Guwahati (INDIA) , i have gone
>> > through source code of strace 4.9 , i am interested in Structured output
>> > project . it is mentioned in the project detail that there has been a
>> > project on this topic during the GSOC 2014, but it is not completed .
>> so can
>> > you guide me how to start and what are your expected results from this
>> > project.
>>
>> Hi Amish:
>> And thank for your interest in strace!
>> The best source of information is this list archive here or on gmane.
>> This includes recent posts on the topic as well as history circa
>> Spring and Summer 2014.
>>
>> --
>> Cordially
>> Philippe Ombredanne
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Strace-devel mailing list
>> Strace-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/strace-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150307/b4a3ea19/attachment.html>
-------------- next part --------------
json formatting example:
in file test.c
#include<stdio.h>
int main()
{
printf("hello world\n");
return 0;
}
gcc test.c -o test
strace -T -j -olog1 ./test
strace -T -olog2 ./test
in file log1
{
"Function" : execve
"Arguments" : ("./a.out", ["./a.out"], [/* 75 vars */])
"Return" : 0
"TimeSpent" : 0.000466
}
{
"Function" : brk
"Arguments" : (0)
"Return" : 0x116c000
"TimeSpent" : 0.000057
}
{
"Function" : access
"Arguments" : ("/etc/ld.so.nohwcap", F_OK)
"Return" : -1 ENOENT (No such file or directory)
"TimeSpent" : 0.000032
}
{
"Function" : mmap
"Arguments" : (NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
"Return" : 0x7fc31b9c3000
"TimeSpent" : 0.000023
}
{
"Function" : access
"Arguments" : ("/etc/ld.so.preload", R_OK)
"Return" : -1 ENOENT (No such file or directory)
"TimeSpent" : 0.000024
}
{
"Function" : open
"Arguments" : ("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC)
"Return" : 3
"TimeSpent" : 0.000053
}
{
"Function" : fstat
"Arguments" : (3, {st_mode=S_IFREG|0644, st_size=95090, ...})
"Return" : 0
"TimeSpent" : 0.000021
}
{
"Function" : mmap
"Arguments" : (NULL, 95090, PROT_READ, MAP_PRIVATE, 3, 0)
"Return" : 0x7fc31b9ab000
"TimeSpent" : 0.000021
}
{
"Function" : close
"Arguments" : (3)
"Return" : 0
"TimeSpent" : 0.000014
}
{
"Function" : access
"Arguments" : ("/etc/ld.so.nohwcap", F_OK)
"Return" : -1 ENOENT (No such file or directory)
"TimeSpent" : 0.000023
}
{
"Function" : open
"Arguments" : ("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC)
"Return" : 3
"TimeSpent" : 0.000028
}
{
"Function" : read
"Arguments" : (3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832)
"Return" : 832
"TimeSpent" : 0.000019
}
{
"Function" : fstat
"Arguments" : (3, {st_mode=S_IFREG|0755, st_size=1840928, ...})
"Return" : 0
"TimeSpent" : 0.000016
}
{
"Function" : mmap
"Arguments" : (NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
"Return" : 0x7fc31b3de000
"TimeSpent" : 0.000020
}
{
"Function" : mprotect
"Arguments" : (0x7fc31b599000, 2093056, PROT_NONE)
"Return" : 0
"TimeSpent" : 0.000035
}
{
"Function" : mmap
"Arguments" : (0x7fc31b798000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000)
"Return" : 0x7fc31b798000
"TimeSpent" : 0.000028
}
{
"Function" : mmap
"Arguments" : (0x7fc31b79e000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)
"Return" : 0x7fc31b79e000
"TimeSpent" : 0.000022
}
{
"Function" : close
"Arguments" : (3)
"Return" : 0
"TimeSpent" : 0.000016
}
{
"Function" : mmap
"Arguments" : (NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
"Return" : 0x7fc31b9aa000
"TimeSpent" : 0.000019
}
{
"Function" : mmap
"Arguments" : (NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
"Return" : 0x7fc31b9a8000
"TimeSpent" : 0.000018
}
{
"Function" : arch_prctl
"Arguments" : (ARCH_SET_FS, 0x7fc31b9a8740)
"Return" : 0
"TimeSpent" : 0.000015
}
{
"Function" : mprotect
"Arguments" : (0x7fc31b798000, 16384, PROT_READ)
"Return" : 0
"TimeSpent" : 0.000024
}
{
"Function" : mprotect
"Arguments" : (0x600000, 4096, PROT_READ)
"Return" : 0
"TimeSpent" : 0.000019
}
{
"Function" : mprotect
"Arguments" : (0x7fc31b9c5000, 4096, PROT_READ)
"Return" : 0
"TimeSpent" : 0.000021
}
{
"Function" : munmap
"Arguments" : (0x7fc31b9ab000, 95090)
"Return" : 0
"TimeSpent" : 0.000034
}
{
"Function" : fstat
"Arguments" : (1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...})
"Return" : 0
"TimeSpent" : 0.000017
}
{
"Function" : mmap
"Arguments" : (NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
"Return" : 0x7fc31b9c2000
"TimeSpent" : 0.000083
}
{
"Function" : write
"Arguments" : (1, "hello world\n", 12)
"Return" : 12
"TimeSpent" : 0.000047
}
{
"Function" : exit_group
"Arguments" : (0) = ?
+++ exited with 0 +++
in file log2
execve("./a.out", ["./a.out"], [/* 75 vars */]) = 0 <0.000259>
brk(0) = 0x13a4000 <0.000014>
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000016>
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2e351ec000 <0.000014>
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) <0.000014>
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 <0.000019>
fstat(3, {st_mode=S_IFREG|0644, st_size=95090, ...}) = 0 <0.000012>
mmap(NULL, 95090, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2e351d4000 <0.000014>
close(3) = 0 <0.000008>
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000014>
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 <0.000017>
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832 <0.000013>
fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0 <0.000010>
mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2e34c07000 <0.000012>
mprotect(0x7f2e34dc2000, 2093056, PROT_NONE) = 0 <0.000016>
mmap(0x7f2e34fc1000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7f2e34fc1000 <0.000014>
mmap(0x7f2e34fc7000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2e34fc7000 <0.000012>
close(3) = 0 <0.000008>
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2e351d3000 <0.000011>
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2e351d1000 <0.000010>
arch_prctl(ARCH_SET_FS, 0x7f2e351d1740) = 0 <0.000008>
mprotect(0x7f2e34fc1000, 16384, PROT_READ) = 0 <0.000013>
mprotect(0x600000, 4096, PROT_READ) = 0 <0.000011>
mprotect(0x7f2e351ee000, 4096, PROT_READ) = 0 <0.000011>
munmap(0x7f2e351d4000, 95090) = 0 <0.000019>
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 <0.000010>
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2e351eb000 <0.000011>
write(1, "hello world\n", 12) = 12 <0.000028>
exit_group(0) = ?
+++ exited with 0 +++
More information about the Strace-devel
mailing list