T tracer: don't depend on T_BUFFER_MAX anymore in the tracers

Whenever the value T_BUFFER_MAX changes, the tracers had to
be recompiled. The only reason why it was needed is because we
used some fixed size buffers to read events. This commit removes
this restriction.

Also, with the basic simulator, this value T_BUFFER_MAX now comes
with an #ifdef which would have required some special hackish-level
tricks in the tracers, which is not good.

Let's just allocate memory when needed.
This commit is contained in:
Cedric Roux
2018-05-02 12:11:34 +02:00
parent 6cb04bb43a
commit 52cf61de97
16 changed files with 80 additions and 36 deletions
@@ -100,10 +100,12 @@ err:
int last_frame = -1;
int last_subframe = -1;
int subframe_written = 0;
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(fd, v, database);
e = get_event(fd, &ebuf, database);
if (e.type == -1) break;
if (e.type != output_event_id) continue;
if (verbose)