X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=runtime%2Flwt.c;h=a986567bcb05023f8e6bafb541035fe5266f9900;hp=0c3147fe5f18489b9ccef75e6a6c10994d15fea7;hb=778b8c8ca708b082a1192acfb114a6751b2ad7c9;hpb=2cce67f0002cdb6dcdc2ab8ccf837e3d2b3336de diff --git a/runtime/lwt.c b/runtime/lwt.c index 0c3147f..a986567 100644 --- a/runtime/lwt.c +++ b/runtime/lwt.c @@ -10,8 +10,8 @@ #include "lwt.h" #include "mem.h" -#define LWT_BUFFER_SCALE 16 -#define LWT_BUFFER_SIZE (1 << LWT_BUFFER_SCALE) +#define LWT_BUFFER_SCALE 20 +#define LWT_BUFFER_SIZE (1ULL << LWT_BUFFER_SCALE) #define LWT_BUFFER_MASK (LWT_BUFFER_SIZE - 1) volatile int halt_ = 0; @@ -19,8 +19,8 @@ volatile int halt_ = 0; typedef struct lwt_record { uint64_t timestamp; uint64_t format; - uint64_t value1; - uint64_t value2; + size_t value1; + size_t value2; } lwt_record_t; typedef struct lwt_buffer { @@ -51,7 +51,7 @@ void lwt_set_trace_level (const char *flags) } } -static inline void dump_record (FILE *file, int thread_id, lwt_record_t *r, uint64_t offset) +static void dump_record (FILE *file, int thread_id, lwt_record_t *r, uint64_t offset) { // print the record if its trace category is enabled at a high enough level int flag = r->format >> 56;