trace: Specify trace file name
commit9410b56c82a107ed48c1f40aa6820c03094d97e9
authorPrerna Saxena <prerna@linux.vnet.ibm.com>
Tue, 13 Jul 2010 08:26:32 +0000 (13 09:26 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 9 Sep 2010 21:22:44 +0000 (9 16:22 -0500)
tree5d83bb61233a7f8aa7aaa6a7c81db93b40470282
parent1e2cf2bc455622f9e0903a360cdaf6b89ec949a2
trace: Specify trace file name

Allow users to specify a file for trace-outputs at configuration.
Also, allow trace files to be annotated by <pid> so each qemu instance has
unique traces.

The trace file name can be passed as a config option:
--trace-file=/path/to/file
(Default: trace )
At runtime, the pid of the qemu process is appended to the filename so
that mutiple qemu instances do not have overlapping logs.

Eg : trace-1234 for qemu launched with pid 1234.

I have yet to test this on windows. getpid() is used at many places
in code(including vnc.c), so I'm hoping this would be okay too.

Edited-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
configure
simpletrace.c