Skip to content

Commit

Permalink
altrace: rename "entry" to "event" since they aren't all entry points…
Browse files Browse the repository at this point in the history
… now.
  • Loading branch information
icculus committed Jul 7, 2019
1 parent 4159b2b commit 6f5c8a9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions altrace/altrace_common.h
Expand Up @@ -92,13 +92,13 @@ static uint64 swap64(uint64 x)
typedef enum
{
ALEE_EOS,
ALEE_ALERROR_EVENT,
ALEE_ALCERROR_EVENT,
ALEE_NEW_CALLSTACK_SYMS_EVENT,
ALEE_ALERROR_TRIGGERED,
ALEE_ALCERROR_TRIGGERED,
ALEE_NEW_CALLSTACK_SYMS,
#define ENTRYPOINT(ret,name,params,args) ALEE_##name,
#include "altrace_entrypoints.h"
ALEE_MAX
} EntryEnum;
} EventEnum;


#define ENTRYPOINT(ret,name,params,args) static ret (*REAL_##name) params = NULL;
Expand Down
12 changes: 6 additions & 6 deletions altrace/altrace_playback.c
Expand Up @@ -176,9 +176,9 @@ static const char *IO_STRING(void)
return (const char *) IO_BLOB(&len);
}

static EntryEnum IO_ENTRYENUM(void)
static EventEnum IO_EVENTENUM(void)
{
return (EntryEnum) IO_UINT32();
return (EventEnum) IO_UINT32();
}

static void *IO_PTR(void)
Expand Down Expand Up @@ -2242,19 +2242,19 @@ static void process_log(void)
}
}

switch (IO_ENTRYENUM()) {
switch (IO_EVENTENUM()) {
#define ENTRYPOINT(ret,name,params,args) case ALEE_##name: dump_##name(); break;
#include "altrace_entrypoints.h"

case ALEE_NEW_CALLSTACK_SYMS_EVENT:
case ALEE_NEW_CALLSTACK_SYMS:
dump_callstack_syms_event();
break;

case ALEE_ALERROR_EVENT:
case ALEE_ALERROR_TRIGGERED:
dump_al_error_event();
break;

case ALEE_ALCERROR_EVENT:
case ALEE_ALCERROR_TRIGGERED:
dump_alc_error_event();
break;

Expand Down
12 changes: 6 additions & 6 deletions altrace/altrace_record.c
Expand Up @@ -154,7 +154,7 @@ static void IO_BLOB(const uint8 *data, const uint64 len)
}
}

static void IO_ENTRYENUM(const EntryEnum x)
static void IO_EVENTENUM(const EventEnum x)
{
IO_UINT32((uint32) x);
}
Expand Down Expand Up @@ -215,7 +215,7 @@ static char *get_callstack_sym(void *frame, int *_seen_before)
return retval;
}

__attribute__((noinline)) static void IO_ENTRYINFO(const EntryEnum entryid)
__attribute__((noinline)) static void IO_ENTRYINFO(const EventEnum entryid)
{
const uint32 now = NOW();
const size_t MAX_CALLSTACKS = 32;
Expand Down Expand Up @@ -249,7 +249,7 @@ __attribute__((noinline)) static void IO_ENTRYINFO(const EntryEnum entryid)

if (num_new_strings > 0) {
IO_UINT32(now);
IO_ENTRYENUM(ALEE_NEW_CALLSTACK_SYMS_EVENT);
IO_EVENTENUM(ALEE_NEW_CALLSTACK_SYMS);
IO_UINT32((uint32) num_new_strings);
for (i = 0; i < num_new_strings; i++) {
IO_PTR(new_strings_ptrs[i]);
Expand All @@ -258,7 +258,7 @@ __attribute__((noinline)) static void IO_ENTRYINFO(const EntryEnum entryid)
}

IO_UINT32(now);
IO_ENTRYENUM(entryid);
IO_EVENTENUM(entryid);
IO_UINT64((uint64) pthread_self());

IO_UINT32((uint32) frames);
Expand Down Expand Up @@ -293,7 +293,7 @@ static void check_al_error_events(void)
const ALenum alerr = REAL_alGetError();
if (alerr != AL_NO_ERROR) {
IO_UINT32(NOW());
IO_ENTRYENUM(ALEE_ALERROR_EVENT);
IO_EVENTENUM(ALEE_ALERROR_TRIGGERED);
IO_ENUM(alerr);
if (current_context->errorlatch == AL_NO_ERROR) {
current_context->errorlatch = alerr;
Expand All @@ -308,7 +308,7 @@ static void check_alc_error_events(ALCdevice *device)
if (alcerr != ALC_NO_ERROR) {
DeviceItem *i;
IO_UINT32(NOW());
IO_ENTRYENUM(ALEE_ALCERROR_EVENT);
IO_EVENTENUM(ALEE_ALCERROR_TRIGGERED);
IO_PTR(device);
IO_ALCENUM(alcerr);
for (i = &devices; i != NULL; i = i->next) {
Expand Down

0 comments on commit 6f5c8a9

Please sign in to comment.