profile.h (55205) | profile.h (71576) |
---|---|
1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)profile.h 8.1 (Berkeley) 6/11/93 | 1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)profile.h 8.1 (Berkeley) 6/11/93 |
34 * $FreeBSD: head/sys/i386/include/profile.h 55205 1999-12-29 04:46:21Z peter $ | 34 * $FreeBSD: head/sys/i386/include/profile.h 71576 2001-01-24 12:35:55Z jasone $ |
35 */ 36 37#ifndef _MACHINE_PROFILE_H_ 38#define _MACHINE_PROFILE_H_ 39 40#ifdef _KERNEL 41 42/* --- 18 unchanged lines hidden (view full) --- 61#define MCOUNT_ENTER(s) 62#define MCOUNT_EXIT(s) 63#define PC_TO_I(p, pc) ((uintfptr_t)(pc) - (uintfptr_t)(p)->lowpc) 64#else 65#define MCOUNT_DECL(s) u_long s; 66#ifdef SMP 67#define MCOUNT_ENTER(s) { s = read_eflags(); \ 68 __asm __volatile("cli" : : : "memory"); \ | 35 */ 36 37#ifndef _MACHINE_PROFILE_H_ 38#define _MACHINE_PROFILE_H_ 39 40#ifdef _KERNEL 41 42/* --- 18 unchanged lines hidden (view full) --- 61#define MCOUNT_ENTER(s) 62#define MCOUNT_EXIT(s) 63#define PC_TO_I(p, pc) ((uintfptr_t)(pc) - (uintfptr_t)(p)->lowpc) 64#else 65#define MCOUNT_DECL(s) u_long s; 66#ifdef SMP 67#define MCOUNT_ENTER(s) { s = read_eflags(); \ 68 __asm __volatile("cli" : : : "memory"); \ |
69 s_lock_np(&mcount_lock); } 70#define MCOUNT_EXIT(s) { s_unlock_np(&mcount_lock); write_eflags(s); } | 69 mtx_enter(&mcount_mtx, MTX_DEF); } 70#define MCOUNT_EXIT(s) { mtx_exit(&mcount_mtx, MTX_DEF); write_eflags(s); } |
71#else 72#define MCOUNT_ENTER(s) { s = read_eflags(); disable_intr(); } 73#define MCOUNT_EXIT(s) (write_eflags(s)) 74#endif 75#endif /* GUPROF */ 76 77#else /* !_KERNEL */ 78 --- 84 unchanged lines hidden --- | 71#else 72#define MCOUNT_ENTER(s) { s = read_eflags(); disable_intr(); } 73#define MCOUNT_EXIT(s) (write_eflags(s)) 74#endif 75#endif /* GUPROF */ 76 77#else /* !_KERNEL */ 78 --- 84 unchanged lines hidden --- |