1*7675SEdward.Pilatowicz@Sun.COM /* 2*7675SEdward.Pilatowicz@Sun.COM * CDDL HEADER START 3*7675SEdward.Pilatowicz@Sun.COM * 4*7675SEdward.Pilatowicz@Sun.COM * The contents of this file are subject to the terms of the 5*7675SEdward.Pilatowicz@Sun.COM * Common Development and Distribution License (the "License"). 6*7675SEdward.Pilatowicz@Sun.COM * You may not use this file except in compliance with the License. 7*7675SEdward.Pilatowicz@Sun.COM * 8*7675SEdward.Pilatowicz@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*7675SEdward.Pilatowicz@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*7675SEdward.Pilatowicz@Sun.COM * See the License for the specific language governing permissions 11*7675SEdward.Pilatowicz@Sun.COM * and limitations under the License. 12*7675SEdward.Pilatowicz@Sun.COM * 13*7675SEdward.Pilatowicz@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*7675SEdward.Pilatowicz@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*7675SEdward.Pilatowicz@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*7675SEdward.Pilatowicz@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*7675SEdward.Pilatowicz@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*7675SEdward.Pilatowicz@Sun.COM * 19*7675SEdward.Pilatowicz@Sun.COM * CDDL HEADER END 20*7675SEdward.Pilatowicz@Sun.COM */ 21*7675SEdward.Pilatowicz@Sun.COM 22*7675SEdward.Pilatowicz@Sun.COM /* 23*7675SEdward.Pilatowicz@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*7675SEdward.Pilatowicz@Sun.COM * Use is subject to license terms. 25*7675SEdward.Pilatowicz@Sun.COM */ 26*7675SEdward.Pilatowicz@Sun.COM 27*7675SEdward.Pilatowicz@Sun.COM #ifndef _PMAP_COMMON_H 28*7675SEdward.Pilatowicz@Sun.COM #define _PMAP_COMMON_H 29*7675SEdward.Pilatowicz@Sun.COM 30*7675SEdward.Pilatowicz@Sun.COM #ifdef __cplusplus 31*7675SEdward.Pilatowicz@Sun.COM extern "C" { 32*7675SEdward.Pilatowicz@Sun.COM #endif 33*7675SEdward.Pilatowicz@Sun.COM 34*7675SEdward.Pilatowicz@Sun.COM typedef struct lwpstack { 35*7675SEdward.Pilatowicz@Sun.COM lwpid_t lwps_lwpid; 36*7675SEdward.Pilatowicz@Sun.COM stack_t lwps_stack; 37*7675SEdward.Pilatowicz@Sun.COM } lwpstack_t; 38*7675SEdward.Pilatowicz@Sun.COM 39*7675SEdward.Pilatowicz@Sun.COM /* 40*7675SEdward.Pilatowicz@Sun.COM * Used to set the advice type var (at_map) when parsing the arguments to 41*7675SEdward.Pilatowicz@Sun.COM * pmadvise. Later, when creating the map list, at_map is used as a mask 42*7675SEdward.Pilatowicz@Sun.COM * to determine if any generic advice applies to each memory mapping. 43*7675SEdward.Pilatowicz@Sun.COM */ 44*7675SEdward.Pilatowicz@Sun.COM enum atype_enum { 45*7675SEdward.Pilatowicz@Sun.COM AT_PRIVM, 46*7675SEdward.Pilatowicz@Sun.COM AT_SHARED, 47*7675SEdward.Pilatowicz@Sun.COM AT_HEAP, 48*7675SEdward.Pilatowicz@Sun.COM AT_STACK, 49*7675SEdward.Pilatowicz@Sun.COM AT_SEG, 50*7675SEdward.Pilatowicz@Sun.COM AT_NTYPES 51*7675SEdward.Pilatowicz@Sun.COM }; 52*7675SEdward.Pilatowicz@Sun.COM 53*7675SEdward.Pilatowicz@Sun.COM extern int cmpstacks(const void *, const void *); 54*7675SEdward.Pilatowicz@Sun.COM extern char *make_name(struct ps_prochandle *, int, uintptr_t, 55*7675SEdward.Pilatowicz@Sun.COM const char *, char *, size_t); 56*7675SEdward.Pilatowicz@Sun.COM extern char *anon_name(char *, const pstatus_t *, lwpstack_t *, uint_t, 57*7675SEdward.Pilatowicz@Sun.COM uintptr_t, size_t, int, int, int *); 58*7675SEdward.Pilatowicz@Sun.COM 59*7675SEdward.Pilatowicz@Sun.COM 60*7675SEdward.Pilatowicz@Sun.COM #ifdef __cplusplus 61*7675SEdward.Pilatowicz@Sun.COM } 62*7675SEdward.Pilatowicz@Sun.COM #endif 63*7675SEdward.Pilatowicz@Sun.COM 64*7675SEdward.Pilatowicz@Sun.COM #endif /* _PMAP_COMMON_H */ 65