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 CACAO has vmlog support built-in. Use the configure flag --enable-vmlog
38 For other VMs, you need to do two things:
40 * patch the VM code with the provided vmlog_<vm>.patch
41 * configure the VM with CFLAGS that include -Ivmlogdir
42 where vmlogdir is the directory the contains the vmlog
45 You can then compile your VM with vmlog.
51 To use it call the VM with at least the following option added to the command
56 PREFIX is an arbitrary string that will be used as a prefix for the generated
59 Note: For cacao you currently also have to add `-verbose:call` to activate
66 If you want vmlog to ignore certain methods do the following:
68 * put the full names of the methods (as displayed by vmlog)
69 into a file, say "vmloginore.txt".
73 vmlogindex vmloginore vmloginore.txt
75 * add the following option to your VM command line:
77 -vmlog:ignore vmloginore
83 After running something with your prepared VM, you will find the following
86 PREFIX.idx string index
87 PREFIX.str string data
88 PREFIX.#.log log for thread number #
90 Some things you can do now:
92 * Count called methods:
96 * Show open call frames at the end of the log:
100 * Dump all strings in the hash:
104 * Print an indented call trace:
112 An important feature of vmlog is that you can compare the logs created by
113 different VMs. To do this first do a normal vmlog run with the first VM.
114 Then start the second VM with theese options:
116 -vmlog:prefix OTHERPREFIX -vmlog:strings PREFIX
118 where PREFIX is the PREFIX you used for the first VM run and OTHERPREFIX
119 is a different string.
121 You can now compare the logs (for example of the first thread):
123 vmlogdiff OTHERPREFIX PREFIX.0.log OTHERPREFIX.0.log
125 Note: vmlogdiff is currently not fast enough, yet. You can add the
126 `-v` option to it to see what it is doing (on stderr) at least.