11.11Smatt/* $NetBSD: profile.h,v 1.11 2012/02/06 02:14:13 matt Exp $ */
21.1Scgd
31.1Scgd/*
41.7Scgd * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
51.1Scgd * All rights reserved.
61.1Scgd *
71.1Scgd * Author: Chris G. Demetriou
81.11Smatt *
91.1Scgd * Permission to use, copy, modify and distribute this software and
101.1Scgd * its documentation is hereby granted, provided that both the copyright
111.1Scgd * notice and this permission notice appear in all copies of the
121.1Scgd * software, derivative works or modified versions, and any portions
131.1Scgd * thereof, and that both notices appear in supporting documentation.
141.11Smatt *
151.11Smatt * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
161.11Smatt * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
171.1Scgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
181.11Smatt *
191.1Scgd * Carnegie Mellon requests users of this software to return to
201.1Scgd *
211.1Scgd *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
221.1Scgd *  School of Computer Science
231.1Scgd *  Carnegie Mellon University
241.1Scgd *  Pittsburgh PA 15213-3890
251.1Scgd *
261.1Scgd * any improvements or extensions that they make and grant Carnegie the
271.1Scgd * rights to redistribute these changes.
281.1Scgd */
291.1Scgd
301.2Sjtc#ifdef _KERNEL
311.3Scgd/*
321.3Scgd * The following two macros do splhigh and splx respectively.
331.4Scgd * _alpha_pal_swpipl is a special version of alpha_pal_swpipl which
341.3Scgd * doesn't include profiling support.
351.3Scgd *
361.3Scgd * XXX These macros should probably use inline assembly.
371.3Scgd */
381.10Sthorpej#define MCOUNT_ENTER							\
391.5Scgd	s = _alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH)
401.10Sthorpej#define MCOUNT_EXIT							\
411.4Scgd	(void)_alpha_pal_swpipl(s);
421.10Sthorpej#endif /* _KERNEL */
431.10Sthorpej
441.10Sthorpej#define	_MCOUNT_DECL	void mcount
451.10Sthorpej#define	_MCOUNT_FUNC	mcount
46