Skip to content

Commit

Permalink
increase srcloc limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Nov 18, 2024
1 parent cb1bb05 commit 55247d5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions prof.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ struct utracy_source_location {
int unsigned color;
};

static struct utracy_source_location srclocs[0x10002];
static struct utracy_source_location srclocs[0x14002];

UTRACY_INTERNAL UTRACY_INLINE
void utracy_emit_zone_begin(int unsigned proc) {
Expand Down Expand Up @@ -991,7 +991,7 @@ int utracy_server_thread_start(void* arg) {
/* byond hooks */
UTRACY_INTERNAL
struct object UTRACY_WINDOWS_CDECL UTRACY_LINUX_REGPARM(3) exec_proc(struct proc *proc) {
if(likely(proc->procdef < 0x10000)) {
if(likely(proc->procdef < 0x14000)) {
utracy_emit_zone_begin(proc->procdef);

/* procs with pre-existing contexts are resuming from sleep */
Expand All @@ -1014,7 +1014,7 @@ int UTRACY_WINDOWS_STDCALL UTRACY_LINUX_CDECL server_tick(void) {
/* server tick is the end of a frame and the beginning of the next frame */
utracy_emit_frame_mark(NULL);

utracy_emit_zone_begin(0x10000);
utracy_emit_zone_begin(0x14000);

int interval = byond.orig_server_tick();

Expand All @@ -1025,7 +1025,7 @@ int UTRACY_WINDOWS_STDCALL UTRACY_LINUX_CDECL server_tick(void) {

UTRACY_INTERNAL
void UTRACY_WINDOWS_CDECL UTRACY_LINUX_CDECL send_maps(void) {
utracy_emit_zone_begin(0x10001);
utracy_emit_zone_begin(0x14001);

byond.orig_send_maps();

Expand Down Expand Up @@ -1352,7 +1352,7 @@ void build_srclocs(void) {
#define byond_get_procdef_path(procdef) *((int unsigned *)((procdef) + byond.procdef_desc.path))
#define byond_get_procdef_bytecode(procdef) *((int unsigned *)((procdef) + byond.procdef_desc.bytecode))

for(int unsigned i=0; i<0x10000; i++) {
for(int unsigned i=0; i<0x14000; i++) {
char *name = NULL;
char *function = "<?>";
char *file = "<?.dm>";
Expand Down Expand Up @@ -1397,15 +1397,15 @@ void build_srclocs(void) {
};
}

srclocs[0x10000] = (struct utracy_source_location) {
srclocs[0x14000] = (struct utracy_source_location) {
.name = NULL,
.function = "ServerTick",
.file = __FILE__,
.line = __LINE__,
.color = 0x44AF44
};

srclocs[0x10001] = (struct utracy_source_location) {
srclocs[0x14001] = (struct utracy_source_location) {
.name = NULL,
.function = "SendMaps",
.file = __FILE__,
Expand Down

0 comments on commit 55247d5

Please sign in to comment.