1 /* |
1 /* |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
111 |
112 |
112 struct reg; |
113 struct reg; |
113 struct ps_prochandle; |
114 struct ps_prochandle; |
114 |
115 |
115 // attach to a process |
116 // attach to a process |
116 struct ps_prochandle* Pgrab(pid_t pid); |
117 JNIEXPORT struct ps_prochandle* |
|
118 Pgrab(pid_t pid); |
117 |
119 |
118 // attach to a core dump |
120 // attach to a core dump |
119 struct ps_prochandle* Pgrab_core(const char* execfile, const char* corefile); |
121 JNIEXPORT struct ps_prochandle* |
|
122 Pgrab_core(const char* execfile, const char* corefile); |
120 |
123 |
121 // release a process or core |
124 // release a process or core |
122 void Prelease(struct ps_prochandle* ph); |
125 JNIEXPORT void |
|
126 Prelease(struct ps_prochandle* ph); |
123 |
127 |
124 // functions not directly available in Solaris libproc |
128 // functions not directly available in Solaris libproc |
125 |
129 |
126 // initialize libproc (call this only once per app) |
130 // initialize libproc (call this only once per app) |
127 // pass true to make library verbose |
131 // pass true to make library verbose |
128 bool init_libproc(bool verbose); |
132 JNIEXPORT bool |
|
133 init_libproc(bool verbose); |
129 |
134 |
130 // get number of threads |
135 // get number of threads |
131 int get_num_threads(struct ps_prochandle* ph); |
136 int get_num_threads(struct ps_prochandle* ph); |
132 |
137 |
133 // get lwp_id of n'th thread |
138 // get lwp_id of n'th thread |