Bug 3185 - ftrace printing deficiencies
Summary: ftrace printing deficiencies
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 2245
  Show dependency treegraph
 
Reported: 2006-09-07 23:51 UTC by Tom Tromey
Modified: 2006-11-28 16:49 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2006-09-07 23:51:47 UTC
I compared ftrace output to strace output.  strace has a few
goodies that ftrace should emulate.

First, strace will print things symbolically, in a context-sensitive way.
E.g., it will use O_ symbols when decoding the argument to 'open'.

Second, strace will defer printing a result argument until the syscall
returns.  Try strace'ing a shell, for instance:

opsy. strace -p 2370
Process 2370 attached - interrupt to quit
read(0,

it will pause there until the syscall returns, at which point it will
print the contents of the buffer (if the read was successful)

strace also decodes structure arguments; the man page details this.
Comment 1 Wu Zhou 2006-09-28 15:36:42 UTC
To do these, ftrace needs to understand a lot more about the available system
calls. Currently it can only get what it can get from memory and register, when
it stops at syscall entry or exit.

I recalled that we talked about that a long time before. But Andrew don't think
doing such beautifying thing is high priority at that time. I am not sure if
Andrew change his mind or not.  :-)

Here is the link: http://sources.redhat.com/ml/frysk/2006-q1/msg00092.html
Comment 2 Tom Tromey 2006-09-28 17:07:05 UTC
Yeah... it may be helpful if the Syscall API exported
information about the types of arguments (& return value)
and also whether things are in/out arguments, etc.
Ideally, IMO, this would be done in some high-level way --
not just exporting the Strings that are used internally.

Considering that some arguments are pointers to structs,
perhaps this needs to interface with whatever Stan is doing
for variable lookups.
Comment 3 Andrew Cagney 2006-10-04 14:16:47 UTC
Right, strace has hardwired knowledge of the structure of each parameter.  In
contrast, frysk can have full type/variable information (in frysk.rt) so it
should use that.