Print this page
6583 remove whole-process swapping
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/mdb/common/modules/genunix/findstack.h
+++ new/usr/src/cmd/mdb/common/modules/genunix/findstack.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 */
25 25
26 26 #ifndef _MDB_FINDSTACK_H
27 27 #define _MDB_FINDSTACK_H
28 28
29 29 #include <mdb/mdb_modapi.h>
30 30 #include <sys/param.h>
31 31
32 32 #ifdef __cplusplus
33 33 extern "C" {
34 34 #endif
35 35
36 36 typedef struct findstack_info {
37 37 uintptr_t *fsi_stack; /* place to record frames */
38 38 uintptr_t fsi_sp; /* stack pointer */
39 39 uintptr_t fsi_pc; /* pc */
↓ open down ↓ |
39 lines elided |
↑ open up ↑ |
40 40 uintptr_t fsi_sobj_ops; /* sobj_ops */
41 41 uint_t fsi_tstate; /* t_state */
42 42 uchar_t fsi_depth; /* stack depth */
43 43 uchar_t fsi_failed; /* search failed */
44 44 uchar_t fsi_overflow; /* stack was deeper than max_depth */
45 45 uchar_t fsi_panic; /* thread called panic() */
46 46 uchar_t fsi_max_depth; /* stack frames available */
47 47 } findstack_info_t;
48 48
49 49 #define FSI_FAIL_BADTHREAD 1
50 -#define FSI_FAIL_NOTINMEMORY 2
51 -#define FSI_FAIL_THREADCORRUPT 3
52 -#define FSI_FAIL_STACKNOTFOUND 4
50 +#define FSI_FAIL_THREADCORRUPT 2
51 +#define FSI_FAIL_STACKNOTFOUND 3
53 52
54 53 typedef struct stacks_module {
55 54 char sm_name[MAXPATHLEN]; /* name of module */
56 55 uintptr_t sm_text; /* base address of text in module */
57 56 size_t sm_size; /* size of text in module */
58 57 } stacks_module_t;
59 58
60 59 extern int findstack(uintptr_t, uint_t, int, const mdb_arg_t *);
61 60 extern int findstack_debug(uintptr_t, uint_t, int, const mdb_arg_t *);
62 61
63 62 /*
64 63 * The following routines are implemented in findstack.c, shared across both
65 64 * genunix and libc.
66 65 */
67 66 extern int stacks(uintptr_t, uint_t, int, const mdb_arg_t *);
68 67 extern void stacks_cleanup(int);
69 68
70 69 /*
71 70 * The following routines are specific to their context (kernel vs. user-land)
72 71 * and are therefore implemented in findstack_subr.c (of which each of genunix
73 72 * and libc have their own copy).
74 73 */
75 74 extern void stacks_help(void);
76 75 extern int stacks_findstack(uintptr_t, findstack_info_t *, uint_t);
77 76 extern void stacks_findstack_cleanup();
78 77 extern int stacks_module(stacks_module_t *);
79 78
80 79 extern int findstack_debug_on;
81 80
82 81 #define fs_dprintf(x) \
83 82 if (findstack_debug_on) { \
84 83 mdb_printf("findstack debug: "); \
85 84 /*CSTYLED*/ \
86 85 mdb_printf x ; \
87 86 }
88 87
89 88 #ifdef __cplusplus
90 89 }
91 90 #endif
92 91
93 92 #endif /* _MDB_FINDSTACK_H */
↓ open down ↓ |
31 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX