Mercurial > hg > truffle
annotate src/share/vm/services/gcNotifier.hpp @ 4058:59e515ee9354
7059047: EA: can't find initializing store with several CheckCastPP
Summary: Split adjust_escape_state() method into two methods to find initializing stores.
Reviewed-by: never
author | kvn |
---|---|
date | Mon, 07 Nov 2011 14:33:57 -0800 |
parents | 78542e2b5e35 |
children | 1891640ca63f |
rev | line source |
---|---|
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
1 /* |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
4 * |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
8 * |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
13 * accompanied this code). |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
14 * |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
18 * |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
21 * questions. |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
22 * |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
23 */ |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
24 |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
25 #ifndef SHARE_VM_SERVICES_GCNOTIFIER_HPP |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
26 #define SHARE_VM_SERVICES_GCNOTIFIER_HPP |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
27 |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
28 #include "memory/allocation.hpp" |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
29 #include "services/memoryPool.hpp" |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
30 #include "services/memoryService.hpp" |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
31 #include "services/memoryManager.hpp" |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
32 |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
33 class GCNotificationRequest : public CHeapObj { |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
34 friend class GCNotifier; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
35 GCNotificationRequest *next; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
36 jlong timestamp; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
37 GCMemoryManager *gcManager; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
38 const char *gcAction; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
39 const char *gcCause; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
40 GCStatInfo *gcStatInfo; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
41 public: |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
42 GCNotificationRequest(jlong ts, GCMemoryManager *manager, const char*action, const char *cause,GCStatInfo *info) { |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
43 next = NULL; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
44 timestamp = ts; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
45 gcManager = manager; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
46 gcAction = action; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
47 gcCause = cause; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
48 gcStatInfo = info; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
49 } |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
50 |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
51 ~GCNotificationRequest() { |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
52 delete gcStatInfo; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
53 } |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
54 }; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
55 |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
56 class GCNotifier : public AllStatic { |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
57 friend class ServiceThread; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
58 private: |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
59 static GCNotificationRequest *first_request; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
60 static GCNotificationRequest *last_request; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
61 static void addRequest(GCNotificationRequest *request); |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
62 static GCNotificationRequest *getRequest(); |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
63 public: |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
64 static void pushNotification(GCMemoryManager *manager, const char *action, const char *cause); |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
65 static bool has_event(); |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
66 static void sendNotification(TRAPS); |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
67 }; |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
68 |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
diff
changeset
|
69 #endif // SHARE_VM_SERVICES_GCNOTIFIER_HPP |