dynamorio icon indicating copy to clipboard operation
dynamorio copied to clipboard

i#6913: Enable syscall stats in func_view

Open edeiana opened this issue 1 year ago • 3 comments

The func_view tool does not print "call" and "return" statistics for system calls. We add support to do so for system calls that are present in funclist.log in the trace directory. The file funclist.log contains one entry per line that looks like the following example: 4294967498,6,,SYS_futex (= ID, #args, unused, name)

We further constrain func_view to print the call-graph and call/return statistics only for the functions present in funclist.log.

Tested manually, as adding funclist.log to a trace in suite/test/CMakeLists.txt doesn't seem trivial and adding complexity to it doesn't seem worth it for this change.

Fixes: #6913

edeiana avatar Aug 07 '24 01:08 edeiana

I noticed that func_view doesn't really check if a function is in funclist.log. As long as there is a funclist.log file (with any entry) in the trace dir, func_view prints the callgraph and function statistics (calls and returns) for every function in the trace (it just prints their id without the name). Was this the intended behavior?

edeiana avatar Aug 14 '24 06:08 edeiana

I noticed that func_view doesn't really check if a function is in funclist.log. As long as there is a funclist.log file (with any entry) in the trace dir, func_view prints the callgraph and function statistics (calls and returns) for every function in the trace (it just prints their id without the name). Was this the intended behavior?

I could see it either way: saying it's an error to not be present; or allowing anything and printing the id (probably should add "name not available"). Xref #6913 on proper checks.

derekbruening avatar Aug 14 '24 17:08 derekbruening

I noticed that func_view doesn't really check if a function is in funclist.log. As long as there is a funclist.log file (with any entry) in the trace dir, func_view prints the callgraph and function statistics (calls and returns) for every function in the trace (it just prints their id without the name). Was this the intended behavior?

I could see it either way: saying it's an error to not be present; or allowing anything and printing the id (probably should add "name not available"). Xref #6913 on proper checks.

#6913 addressed. Also, we don't need to specialize func_view behavior for REGDEPS traces anymore, so I removed the filetype, and updated the PR description and title to reflect that this is not a REGDEPS issue anymore.

edeiana avatar Aug 14 '24 20:08 edeiana

#6916 supersedes this PR. Removing.

edeiana avatar Sep 18 '24 23:09 edeiana