X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..8f6c56a50524aa785f7e596d52dddfb331e18961:/osfmk/profiling/i386/profile-asm.s diff --git a/osfmk/profiling/i386/profile-asm.s b/osfmk/profiling/i386/profile-asm.s index d4272c053..2386d46bf 100644 --- a/osfmk/profiling/i386/profile-asm.s +++ b/osfmk/profiling/i386/profile-asm.s @@ -1,23 +1,29 @@ /* * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * - * @APPLE_LICENSE_HEADER_END@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * @OSF_COPYRIGHT@ @@ -176,8 +182,6 @@ .file "profile-asm.s" -#include - #include /* @@ -661,11 +665,9 @@ ENDDATA(_profile_do_stats) * except to load this pointer. */ -#if defined (MACH_KERNEL) && NCPUS > 1 +#if defined (MACH_KERNEL) #define ASSEMBLER -#if AT386 -#include -#endif +#include #if SQT #include @@ -677,7 +679,7 @@ ENDDATA(_profile_do_stats) #define Vload CPU_NUMBER(%ebx); movl EXT(_profile_vars_cpus)(,%ebx,4),%ebx -#else /* not kernel or not multiprocessor */ +#else /* not kernel */ #define Vload Gload; Egaddr(%ebx,_profile_vars) #endif @@ -795,13 +797,13 @@ LCL(alloc_new): #if DO_STATS SLOCK addl %esi,V_wasted(%ebx,%edi,4) /* udpate global counters */ - SLOCK addl $M_size,V_overhead(%ebx,%edi,4) + SLOCK addl $(M_size),V_overhead(%ebx,%edi,4) #endif popl %ecx /* context block */ movl %eax,%edx /* memory block pointer */ movl %esi,M_nfree(%edx) /* # free bytes */ - addl $M_size,%eax /* bump past overhead */ + addl $(M_size),%eax /* bump past overhead */ movl A_plist(%ecx),%esi /* previous memory block or 0 */ movl %eax,M_first(%edx) /* first space available */ movl %eax,M_ptr(%edx) /* current address available */ @@ -972,8 +974,8 @@ LCL(pnew): SLOCK incl V_prof_records(%ebx) pushl %edx - movl $P_size,%eax /* allocation size */ - movl $C_prof,%ecx /* allocation pool */ + movl $(P_size),%eax /* allocation size */ + movl $(C_prof),%ecx /* allocation pool */ call EXT(_profile_alloc_asm) /* allocate a new record */ popl %edx @@ -1143,8 +1145,8 @@ LCL(gnew): SLOCK incl V_prof_records(%ebx) movl %edx,%esi /* save unique function ptr */ movl %ecx,%edi /* and caller's caller address */ - movl $H_size,%eax /* memory block size */ - movl $C_gfunc,%ecx /* gprof function header memory pool */ + movl $(H_size),%eax /* memory block size */ + movl $(C_gfunc),%ecx /* gprof function header memory pool */ call EXT(_profile_alloc_asm) movl V_hash_ptr(%ebx),%ecx /* copy hash_ptr to func header */ @@ -1193,8 +1195,8 @@ LCL(gnocache): movl %ecx,%eax /* caller's caller address */ imull %edi,%eax /* multiply to get hash */ movl H_hash_ptr(%esi),%edx /* hash pointer */ - shrl $GPROF_HASH_SHIFT,%eax /* eliminate low order bits */ - andl $GPROF_HASH_MASK,%eax /* mask to get hash value */ + shrl $(GPROF_HASH_SHIFT),%eax /* eliminate low order bits */ + andl $(GPROF_HASH_MASK),%eax /* mask to get hash value */ leal 0(%edx,%eax,4),%eax /* pointer to hash bucket */ movl %eax,%edx /* save hash bucket address */ @@ -1258,8 +1260,8 @@ LCL(ghashnew): SLOCK incl V_gprof_records(%ebx) pushl %edx movl %ecx,%edi /* save caller's caller */ - movl $G_size,%eax /* arc size */ - movl $C_gprof,%ecx /* gprof memory pool */ + movl $(G_size),%eax /* arc size */ + movl $(C_gprof),%ecx /* gprof memory pool */ call EXT(_profile_alloc_asm) popl %edx