1*eacc5f97Smatt /* $NetBSD: profile.h,v 1.11 2012/02/06 02:14:13 matt Exp $ */ 285854cb4Scgd 385854cb4Scgd /* 4db5fd4e8Scgd * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. 585854cb4Scgd * All rights reserved. 685854cb4Scgd * 785854cb4Scgd * Author: Chris G. Demetriou 885854cb4Scgd * 985854cb4Scgd * Permission to use, copy, modify and distribute this software and 1085854cb4Scgd * its documentation is hereby granted, provided that both the copyright 1185854cb4Scgd * notice and this permission notice appear in all copies of the 1285854cb4Scgd * software, derivative works or modified versions, and any portions 1385854cb4Scgd * thereof, and that both notices appear in supporting documentation. 1485854cb4Scgd * 1585854cb4Scgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 1685854cb4Scgd * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 1785854cb4Scgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 1885854cb4Scgd * 1985854cb4Scgd * Carnegie Mellon requests users of this software to return to 2085854cb4Scgd * 2185854cb4Scgd * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 2285854cb4Scgd * School of Computer Science 2385854cb4Scgd * Carnegie Mellon University 2485854cb4Scgd * Pittsburgh PA 15213-3890 2585854cb4Scgd * 2685854cb4Scgd * any improvements or extensions that they make and grant Carnegie the 2785854cb4Scgd * rights to redistribute these changes. 2885854cb4Scgd */ 2985854cb4Scgd 3071ab4ed9Sjtc #ifdef _KERNEL 31deb4082fScgd /* 32deb4082fScgd * The following two macros do splhigh and splx respectively. 33c2cd1ae6Scgd * _alpha_pal_swpipl is a special version of alpha_pal_swpipl which 34deb4082fScgd * doesn't include profiling support. 35deb4082fScgd * 36deb4082fScgd * XXX These macros should probably use inline assembly. 37deb4082fScgd */ 38deb4082fScgd #define MCOUNT_ENTER \ 39c8fbe2deScgd s = _alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH) 40deb4082fScgd #define MCOUNT_EXIT \ 41c2cd1ae6Scgd (void)_alpha_pal_swpipl(s); 429c5afcb2Sthorpej #endif /* _KERNEL */ 439c5afcb2Sthorpej 449c5afcb2Sthorpej #define _MCOUNT_DECL void mcount 459c5afcb2Sthorpej #define _MCOUNT_FUNC mcount 46