|
From: Julian S. <js...@ac...> - 2007-02-08 05:52:14
|
(note: the following proposal of course only applies to the trunk, not
to the stable 3.2.X branch)
This is in fact two proposals:
(1) make --trace-mem output less verbose
(2) add new flag --trace-superblocks
------ (1) make --trace-mem output less verbose ------
When given the --trace-mem=yes flag, Lackey produces a complete trace
of instruction and memory accesses, presumably of use to people building
offline analysis tools. It looks like this:
instr : 0x0023C790, 2 # instruction read at 0x0023C790 of size 2
instr : 0x0023C792, 5
store : 0xBE80199C, 4 # data store at 0xBE80199C of size 4
instr : 0x0025242B, 3
load : 0xBE801950, 4 # data load at 0xBE801950 of size 4
instr : 0x0023D476, 7
modify: 0x0025747C, 1 # data modify at 0x0025747C of size 1
instr : 0x0023DC20, 2
load : 0x00254962, 1
load : 0xBE801FB3, 1
instr : 0x00252305, 1
load : 0x00254AEB, 1
store : 0x00257998, 1
Every instruction executed has an "instr" event representing it.
Instructions that do memory accesses are followed by one or more "load",
"store" or "modify" events.
That's nice and simple, but the resulting log files are huge and add up
to tens of gigabytes for any non-trivial program. I'm proposing to nearly
halve the size of them by making the tags shorter and removing the
0x on the addresses, like this:
I 0023C790,2
I 0023C792,5
S BE80199C,4
I 0025242B,3
L BE801950,4
I 0023D476,7
M 0025747C,1
I 0023DC20,2
L 00254962,1
L BE801FB3,1
I 00252305,1
L 00254AEB,1
L 00257998,1
That's nearly as readable and a lot more concise.
------ (2) add new flag --trace-superblocks ------
For the purposes of doing performance analysis of some parts of Valgrind
itself, it would be useful to print the guest address of the first instruction
in each superblock executed. I'm proposing a new flag --trace-superblocks,
which, when active, prints a single line at the start of each superblock in
style compatible with --trace-mem, that is
SB 04000B60
SB 040010E1
SB 04001131
SB 04001120
Any comments? This is a very simple change and does not interfere with
any other aspects of Lackey.
J
|