Open rocallahan opened 7 years ago
FWIW I don't plan to fix this right away but I wanted to get the word out.
So what I have in mind here is something like this:
TraceReader
. This will allow only reading a subset of records, e.g. just the task events. Most of the trace records can just be treated as binary blobs by this API, it's just for moving trace data around.AF_UNIX
socket. Pass filenames or file descriptors over the socket for the hardlinked and FICLONERANGE
data. Mark event boundaries clearly in the socket protocol so a consumer can cleanly cut off a trace when the producer terminates unexpectedly.rr record
push data into a socket using that protocol. We lose the shmem stuff we're currently doing but that's probably OK.rr record
spawn a "file-writer" process to store the trace.rr replay
and rr dump
use that implementation via the trace-consumer API.Then
rr record
and as an independent tool that consumers regular trace files and produces the transport-friendly one.Hi @rocallahan What kind of signal should I send to stop the process safely if I can only send signals to rr?
I don't understand the question, sorry. What do you mean by "the process"?
@rocallahan Sry, I mean the rr process. I have found that sending SIGTERM is fine.
The current trace storage approach has some issues that we need to fix:
SIGKILL
directed at the rr process (not uncommon, when rr is used as a wrapper around some program that normally isSIGKILL
ed by other code, e.g. on timeout) leaves an unusable trace.rr replay
concurrently with anrr record
and be ready to debug as soon as an error is encountered instead of having to wait for the replay.rr replay
to consume trace versions other than the 'current' version.On the other hand it has some important features we need to preserve:
FICLONERANGE
ing files into the trace directory.