author | mr |
Tue, 29 Oct 2019 13:52:04 -0700 | |
changeset 58850 | f4290bf1cc21 |
parent 58503 | 726a3945e934 |
permissions | -rw-r--r-- |
58503
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
1 |
/* |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
4 |
* |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
8 |
* |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
13 |
* accompanied this code). |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
14 |
* |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
18 |
* |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
21 |
* questions. |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
22 |
* |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
23 |
*/ |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
24 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
25 |
#ifndef SHARE_RUNTIME_NOTIFICATIONTHREAD_HPP |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
26 |
#define SHARE_RUNTIME_NOTIFICATIONTHREAD_HPP |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
27 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
28 |
#include "runtime/thread.hpp" |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
29 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
30 |
// A JavaThread for low memory detection support, GC and |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
31 |
// diagnostic framework notifications. This thread is not hidden |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
32 |
// from the external view to allow the debugger to stop at the |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
33 |
// breakpoints inside registred MXBean notification listeners. |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
34 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
35 |
class NotificationThread : public JavaThread { |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
36 |
friend class VMStructs; |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
37 |
private: |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
38 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
39 |
static NotificationThread* _instance; |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
40 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
41 |
static void notification_thread_entry(JavaThread* thread, TRAPS); |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
42 |
NotificationThread(ThreadFunction entry_point) : JavaThread(entry_point) {}; |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
43 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
44 |
public: |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
45 |
static void initialize(); |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
46 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
47 |
}; |
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
48 |
|
726a3945e934
8170299: Debugger does not stop inside the low memory notifications code
dtitov
parents:
diff
changeset
|
49 |
#endif // SHARE_RUNTIME_NOTIFICATIONTHREAD_HPP |