This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ftrace


I added command line parsing to ftrace recently.  I'm attaching a new
.java file.

This uses GNU Classpath's option parsing code, since I like it better
than jargs.  It isn't in gcc 4.1, so perhaps it could be put into
frysk-imports.  If you want to try this, download:

    http://people.redhat.com/~tromey/gcjh/gcjh.jar

This jar includes the getopt code.

I moved Ftrace.java into a package.  Putting classes in the default
package just rubs me the wrong way ... too much java hacking I suppose.
It isn't in the right package, I just made one up; anyway this is
simple to change.

Currently '-o' (output file), '-p' (trace PID), and '-t' (specify
syscalls to trace) are supported.  This code requires all my Syscall
patches.

I've been running it interpreted using fryski.  I found a few oddities
with deployment.

Right now frysk statically links in the various frysk libraries.  This
seems weird.

fryski is not installed.  Installing it might be nice... but I think
my ideal would be to have frysk more directly loadable by gij.  This
would enable things like loading frysk into jython (or really any java
program).  I'm not sure of the best way to do this now that we've
changed the default of gnu.gcj.runtime.VMClassLoader.library_control.
Perhaps having user programs do an explicit System.loadLibrary of some
kind would be sufficient.

One nice result of doing this is that it becomes very easy to hack on
frysk-library-using programs in Eclipse: just import the jars, and
launch gij with a -D to set library_control, and it all magically
works.


On a related note I think the .java files from each 'bindir' should be
moved into real packages and simply put into the appropriate frysk
.so.  The distributed executables can be "source-less", ie linked
like:

    gcj --main=full.class.Name -o frysk -lall-the-libraries

I can file PRs for these things if people agree that this is the way
to go.

Tom

Attachment: Ftrace.java
Description: Ftrace.java


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]