1 vmlog - high-speed logging for free VMs
2 Copyright (c) 2006 Edwin Steiner <edwin.steiner@gmx.net>
3 -----------------------------------------------------------------------
8 vmlog is a software module for doing fast call logging in free Java VMs and a
9 set of tools for examining the created logfiles.
11 Some features of vmlog:
13 * high data density because of binary formats with hashed strings
14 * high speed (ie. you can run big applications with full logging)
15 * small, non-intrusive interface to several VMs
16 * clean separation of threads
17 * can ignore a user-specified list of methods
19 Right now there are complete interfaces for the following VMs:
28 vmlog is free software distributed under the GPL. See the file COPYING
32 How to compile a VM with vmlog
33 ------------------------------
35 You need to do two things:
37 * patch the VM code with the provided vmlog_<vm>.patch
38 * configure the VM with CFLAGS that include -Ivmlogdir
39 where vmlogdir is the directory the contains the vmlog
42 You can then compile your VM with vmlog.
48 To use it call the VM with at least the following option added to the command
53 PREFIX is an arbitrary string that will be used as a prefix for the generated
56 Note: For cacao you currently also have to add `-verbose:call` to activate
63 If you want vmlog to ignore certain methods do the following:
65 * put the full names of the methods (as displayed by vmlog)
66 into a file, say "vmloginore.txt".
70 vmlogindex vmloginore vmloginore.txt
72 * add the following option to your VM command line:
74 -vmlog:ignore vmloginore
80 After running something with your prepared VM, you will find the following
83 PREFIX.idx string index
84 PREFIX.str string data
85 PREFIX.#.log log for thread number #
87 Some things you can do now:
89 * Count called methods:
93 * Show open call frames at the end of the log:
97 * Dump all strings in the hash:
101 * Print an indented call trace:
109 An important feature of vmlog is that you can compare the logs created by
110 different VMs. To do this first do a normal vmlog run with the first VM.
111 Then start the second VM with theese options:
113 -vmlog:prefix OTHERPREFIX -vmlog:strings PREFIX
115 where PREFIX is the PREFIX you used for the first VM run and OTHERPREFIX
116 is a different string.
118 You can now compare the logs (for example of the first thread):
120 vmlogdiff OTHERPREFIX PREFIX.0.log OTHERPREFIX.0.log
122 Note: vmlogdiff is currently not fast enough, yet. You can add the
123 `-v` option to it to see what it is doing (on stderr) at least.