$Id$
The probedata server provides interactive online access to the data structures in the probetools infrastructure, if that is enabled. This allows online and offline profiling tools to be written.
Ideas for these tools include task-manager like profiling, where the tool shows where the application has spent the last n seconds, cumulative profiling, and an interactive interface to control probetools (e.g., to clear its profiling data before an experiment).
No requirements are available yet.
The current protocol is a two-way XML-based synchronous protocol.
The service name of the probedata server is probedata-server.
The all-data command retrieves the current profiling data in full exactly as it would be written to the file opprof0.out.
<all-data/>
The response to the all-data command is a single data element containing encoded binary data. As usual this is presented in the format of a UTF-16 Unicode string:
<data contents="all-data">
<base64-encoded-data>xxxx...</base64-encoded-data>
</data>
Here, xxxx... is the string representation of a base64-coding of a byte array.
There will be other commands soon, as this is just preliminary work. These may be commands like profiling-data (to obtain just time profile), profiling-snapshot (to obtain time profile differences since last snapshot), and memory-snapshot (to obtain a representation of the heap).
If a command fails it will respond with a failure element:
<failure reason="text">
command
</failure>
where text is some human-readable explanation of the failure and command is the entire command that failed, as received.
Invalid XML may fail silently. (Should probably fix this.)