# first-stage, arch-dependent startup code
SRCS= mpx.S
SRCS+= start.c table.c main.c proc.c \
- system.c clock.c utility.c debug.c profile.c interrupt.c \
+ system.c clock.c utility.c debug.c interrupt.c \
watchdog.c cpulocals.c
.ifdef CONFIG_SMP
.include "system/Makefile.inc"
.include "arch/${ARCH}/Makefile.inc"
+
+# These come last, so the profiling buffer is at the end of the data segment
+SRCS+= profile.c do_sprofile.c
+
.include <bsd.prog.mk>
debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h
#include <string.h>
#include "watchdog.h"
+char sprof_sample_buffer[SAMPLE_BUFFER_SIZE];
+
/* Function prototype for the profiling clock handler. */
FORWARD _PROTOTYPE( int profile_clock_handler, (irq_hook_t *hook) );
#include "arch_watchdog.h"
#define SAMPLE_BUFFER_SIZE (64 << 20)
-EXTERN char sprof_sample_buffer[SAMPLE_BUFFER_SIZE];
+extern char sprof_sample_buffer[SAMPLE_BUFFER_SIZE];
EXTERN int sprofiling; /* whether profiling is running */
EXTERN int sprofiling_type; /* whether profiling is running */