dtrace.c (239786) | dtrace.c (242723) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 * | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 * |
21 * $FreeBSD: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c 239786 2012-08-28 18:33:12Z ed $ | 21 * $FreeBSD: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c 242723 2012-11-07 23:45:09Z jhibbits $ |
22 */ 23 24/* 25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 26 * Use is subject to license terms. 27 */ 28 29#pragma ident "%Z%%M% %I% %E% SMI" --- 200 unchanged lines hidden (view full) --- 230static dtrace_genid_t dtrace_probegen; /* current probe generation */ 231static dtrace_helpers_t *dtrace_deferred_pid; /* deferred helper list */ 232static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ 233static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ 234#if !defined(sun) 235static struct mtx dtrace_unr_mtx; 236MTX_SYSINIT(dtrace_unr_mtx, &dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); 237int dtrace_in_probe; /* non-zero if executing a probe */ | 22 */ 23 24/* 25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 26 * Use is subject to license terms. 27 */ 28 29#pragma ident "%Z%%M% %I% %E% SMI" --- 200 unchanged lines hidden (view full) --- 230static dtrace_genid_t dtrace_probegen; /* current probe generation */ 231static dtrace_helpers_t *dtrace_deferred_pid; /* deferred helper list */ 232static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ 233static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ 234#if !defined(sun) 235static struct mtx dtrace_unr_mtx; 236MTX_SYSINIT(dtrace_unr_mtx, &dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); 237int dtrace_in_probe; /* non-zero if executing a probe */ |
238#if defined(__i386__) || defined(__amd64__) || defined(__mips__) | 238#if defined(__i386__) || defined(__amd64__) || defined(__mips__) || defined(__powerpc__) |
239uintptr_t dtrace_in_probe_addr; /* Address of invop when already in probe */ 240#endif 241#endif 242 243/* 244 * DTrace Locking 245 * DTrace is protected by three (relatively coarse-grained) locks: 246 * --- 10510 unchanged lines hidden (view full) --- 10757 buf->dtb_xamot = NULL; 10758 buf->dtb_size = 0; 10759 } while ((cp = cp->cpu_next) != cpu_list); 10760 10761 return (ENOMEM); 10762#else 10763 int i; 10764 | 239uintptr_t dtrace_in_probe_addr; /* Address of invop when already in probe */ 240#endif 241#endif 242 243/* 244 * DTrace Locking 245 * DTrace is protected by three (relatively coarse-grained) locks: 246 * --- 10510 unchanged lines hidden (view full) --- 10757 buf->dtb_xamot = NULL; 10758 buf->dtb_size = 0; 10759 } while ((cp = cp->cpu_next) != cpu_list); 10760 10761 return (ENOMEM); 10762#else 10763 int i; 10764 |
10765#if defined(__amd64__) || defined(__mips__) | 10765#if defined(__amd64__) || defined(__mips__) || defined(__powerpc__) |
10766 /* 10767 * FreeBSD isn't good at limiting the amount of memory we 10768 * ask to malloc, so let's place a limit here before trying 10769 * to do something that might well end in tears at bedtime. 10770 */ 10771 if (size > physmem * PAGE_SIZE / (128 * (mp_maxid + 1))) 10772 return(ENOMEM); 10773#endif --- 5852 unchanged lines hidden --- | 10766 /* 10767 * FreeBSD isn't good at limiting the amount of memory we 10768 * ask to malloc, so let's place a limit here before trying 10769 * to do something that might well end in tears at bedtime. 10770 */ 10771 if (size > physmem * PAGE_SIZE / (128 * (mp_maxid + 1))) 10772 return(ENOMEM); 10773#endif --- 5852 unchanged lines hidden --- |