author | pliden |
Mon, 18 Mar 2019 11:50:40 +0100 | |
changeset 54170 | 8f1771ea1e39 |
parent 53893 | ad56513c7e07 |
child 58811 | 38f4701d6587 |
permissions | -rw-r--r-- |
53893
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
1 |
/* |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
4 |
* |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
8 |
* |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
13 |
* accompanied this code). |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
14 |
* |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
18 |
* |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
21 |
* questions. |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
22 |
*/ |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
23 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
24 |
#ifndef SHARE_GC_Z_ZNMETHODTABLEITERATION_HPP |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
25 |
#define SHARE_GC_Z_ZNMETHODTABLEITERATION_HPP |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
26 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
27 |
#include "gc/z/zGlobals.hpp" |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
28 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
29 |
class NMethodClosure; |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
30 |
class ZNMethodTableEntry; |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
31 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
32 |
class ZNMethodTableIteration { |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
33 |
private: |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
34 |
ZNMethodTableEntry* _table; |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
35 |
size_t _size; |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
36 |
volatile size_t _claimed ATTRIBUTE_ALIGNED(ZCacheLineSize); |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
37 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
38 |
public: |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
39 |
ZNMethodTableIteration(); |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
40 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
41 |
bool in_progress() const; |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
42 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
43 |
void nmethods_do_begin(ZNMethodTableEntry* table, size_t size); |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
44 |
void nmethods_do_end(); |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
45 |
void nmethods_do(NMethodClosure* cl); |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
46 |
}; |
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
47 |
|
ad56513c7e07
8219468: ZGC: Extract iteration functionality into a new ZNMethodTableIteration class
stefank
parents:
diff
changeset
|
48 |
#endif // SHARE_GC_Z_ZNMETHODTABLEITERATION_HPP |