Mercurial > hg > truffle
comparison src/share/vm/classfile/classLoaderData.hpp @ 17935:7384f6a12fc1
8038212: Method::is_valid_method() check has performance regression impact for stackwalking
Summary: Only prune metaspace virtual spaces at safepoint so walking them is safe outside a safepoint.
Reviewed-by: mgerdin, mgronlun, hseigel, stefank
author | coleenp |
---|---|
date | Thu, 15 May 2014 18:23:26 -0400 |
parents | 85318d1fe8fe |
children | e4a6e7f1b90b |
comparison
equal
deleted
inserted
replaced
17934:366c198c896d | 17935:7384f6a12fc1 |
---|---|
64 // All CLDs (except the null CLD) can be reached by walking _head->_next->... | 64 // All CLDs (except the null CLD) can be reached by walking _head->_next->... |
65 static ClassLoaderData* _head; | 65 static ClassLoaderData* _head; |
66 static ClassLoaderData* _unloading; | 66 static ClassLoaderData* _unloading; |
67 // CMS support. | 67 // CMS support. |
68 static ClassLoaderData* _saved_head; | 68 static ClassLoaderData* _saved_head; |
69 static bool _should_purge; | |
69 | 70 |
70 static ClassLoaderData* add(Handle class_loader, bool anonymous, TRAPS); | 71 static ClassLoaderData* add(Handle class_loader, bool anonymous, TRAPS); |
71 static void post_class_unload_events(void); | 72 static void post_class_unload_events(void); |
72 public: | 73 public: |
73 static ClassLoaderData* find_or_create(Handle class_loader, TRAPS); | 74 static ClassLoaderData* find_or_create(Handle class_loader, TRAPS); |
84 | 85 |
85 // CMS support. | 86 // CMS support. |
86 static void remember_new_clds(bool remember) { _saved_head = (remember ? _head : NULL); } | 87 static void remember_new_clds(bool remember) { _saved_head = (remember ? _head : NULL); } |
87 static GrowableArray<ClassLoaderData*>* new_clds(); | 88 static GrowableArray<ClassLoaderData*>* new_clds(); |
88 | 89 |
90 static void set_should_purge(bool b) { _should_purge = b; } | |
91 static void purge_if_needed() { | |
92 // Only purge the CLDG for CMS if concurrent sweep is complete. | |
93 if (_should_purge) { | |
94 purge(); | |
95 // reset for next time. | |
96 set_should_purge(false); | |
97 } | |
98 } | |
99 | |
89 static void dump_on(outputStream * const out) PRODUCT_RETURN; | 100 static void dump_on(outputStream * const out) PRODUCT_RETURN; |
90 static void dump() { dump_on(tty); } | 101 static void dump() { dump_on(tty); } |
91 static void verify(); | 102 static void verify(); |
92 | 103 |
93 // expensive test for pointer in metaspace for debugging | |
94 static bool contains(const void* x); | |
95 #ifndef PRODUCT | 104 #ifndef PRODUCT |
96 static bool contains_loader_data(ClassLoaderData* loader_data); | 105 static bool contains_loader_data(ClassLoaderData* loader_data); |
97 #endif | 106 #endif |
98 | 107 |
99 #if INCLUDE_TRACE | 108 #if INCLUDE_TRACE |