[erlang-questions] Simple question: how to read a trace using trace_client

Richard Evans richardprideauxevans@REDACTED
Mon May 21 18:02:30 CEST 2012

I am trying to trace some function-calls, redirect the trace to a file, and
then, later, read that file to see the messages.

To trace, I am doing:


% to redirect to a file "trace_output"
PortFun = dbg:trace_port(file,{"/tmp/trace_output",
dbg:tracer(port, PortFun).

dbg:tp(lobby, handle_client_message, 2, []).
dbg:p(all, c).

% now I execute the program for a certain period of time and watch the
trace_output file build up

% finishing the trace

This successfully produces a binary file. The longer I run the program, the
larger it gets. This seems right.

The bit that I don't get is how to read the binary file.

I tried using trace_client:

A=dbg:trace_client(file, "/tmp/trace_output").

This returns me the PID of the trace_client process.

But I don't know what to do with this PID!

What I want to see is the list of function-calls in the file. But all I
have is the PID.

What do I do now?

yours puzzledly,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120521/9996ba7f/attachment.htm>

More information about the erlang-questions mailing list