]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix multiboot for ACK-built images
authorArun Thomas <arun@minix3.org>
Fri, 17 Dec 2010 13:47:11 +0000 (13:47 +0000)
committerArun Thomas <arun@minix3.org>
Fri, 17 Dec 2010 13:47:11 +0000 (13:47 +0000)
Move the profiling buffer to the end of the data segment

kernel/Makefile
kernel/profile.c
kernel/profile.h
kernel/system/Makefile.inc

index b4dd00d9fa67bf25f8a65f43b4ef0e465e35279d..d737ea937ef98c8463053916a9b065fa13ae9b9b 100644 (file)
@@ -6,7 +6,7 @@ PROG=   kernel
 # 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
@@ -38,6 +38,10 @@ MAN=
 
 .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
index 4eed04c24b4cba2188d2ab403b87bed7be84e0a0..5cc8ce44328663d847cd0d75a5ef5bb67801f7dd 100644 (file)
@@ -28,6 +28,8 @@
 #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) );
 
index 5580bf544792ec1f251015a61d28c9995b6875bb..d25e2bfca6c0b9cac34037785aeaa3e1a32df7ab 100644 (file)
@@ -8,7 +8,7 @@
 #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 */
index 202bfab0799da05de3d1ad6f73bf36631046982d..0142f58d033dd9e3ff49fda28f1fd1048c96d892 100644 (file)
@@ -34,7 +34,6 @@ SRCS+=        \
        do_sigreturn.c \
        do_abort.c \
        do_getinfo.c \
-       do_sprofile.c \
        do_cprofile.c \
        do_profbuf.c \
        do_vmctl.c \