Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/loaderConstraints.cpp @ 7185:90273fc0a981
8000662: NPG: nashorn ant clean test262 out-of-memory with Java heap
Summary: Add ClassLoaderData object for each anonymous class with metaspaces to allocate in.
Reviewed-by: twisti, jrose, stefank
author | coleenp |
---|---|
date | Thu, 29 Nov 2012 16:50:29 -0500 |
parents | 070d523b96a7 |
children |
comparison
equal
deleted
inserted
replaced
7181:2fc0334f613a | 7185:90273fc0a981 |
---|---|
116 tty->print_cr("[Purging class object from constraint for name %s," | 116 tty->print_cr("[Purging class object from constraint for name %s," |
117 " loader list:", | 117 " loader list:", |
118 probe->name()->as_C_string()); | 118 probe->name()->as_C_string()); |
119 for (int i = 0; i < probe->num_loaders(); i++) { | 119 for (int i = 0; i < probe->num_loaders(); i++) { |
120 tty->print_cr("[ [%d]: %s", i, | 120 tty->print_cr("[ [%d]: %s", i, |
121 SystemDictionary::loader_name(probe->loader_data(i))); | 121 probe->loader_data(i)->loader_name()); |
122 } | 122 } |
123 } | 123 } |
124 } | 124 } |
125 // Remove entries no longer alive from loader array | 125 // Remove entries no longer alive from loader array |
126 int n = 0; | 126 int n = 0; |
127 while (n < probe->num_loaders()) { | 127 while (n < probe->num_loaders()) { |
128 if (probe->loader_data(n)->is_unloading()) { | 128 if (probe->loader_data(n)->is_unloading()) { |
129 if (TraceLoaderConstraints) { | 129 if (TraceLoaderConstraints) { |
130 ResourceMark rm; | 130 ResourceMark rm; |
131 tty->print_cr("[Purging loader %s from constraint for name %s", | 131 tty->print_cr("[Purging loader %s from constraint for name %s", |
132 SystemDictionary::loader_name(probe->loader_data(n)), | 132 probe->loader_data(n)->loader_name(), |
133 probe->name()->as_C_string() | 133 probe->name()->as_C_string() |
134 ); | 134 ); |
135 } | 135 } |
136 | 136 |
137 // Compact array | 137 // Compact array |
143 if (TraceLoaderConstraints) { | 143 if (TraceLoaderConstraints) { |
144 ResourceMark rm; | 144 ResourceMark rm; |
145 tty->print_cr("[New loader list:"); | 145 tty->print_cr("[New loader list:"); |
146 for (int i = 0; i < probe->num_loaders(); i++) { | 146 for (int i = 0; i < probe->num_loaders(); i++) { |
147 tty->print_cr("[ [%d]: %s", i, | 147 tty->print_cr("[ [%d]: %s", i, |
148 SystemDictionary::loader_name(probe->loader_data(i))); | 148 probe->loader_data(i)->loader_name()); |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 continue; // current element replaced, so restart without | 152 continue; // current element replaced, so restart without |
153 // incrementing n | 153 // incrementing n |
398 p1->name()->as_C_string() | 398 p1->name()->as_C_string() |
399 ); | 399 ); |
400 | 400 |
401 for (int i = 0; i < p1->num_loaders(); i++) { | 401 for (int i = 0; i < p1->num_loaders(); i++) { |
402 tty->print_cr("[ [%d]: %s", i, | 402 tty->print_cr("[ [%d]: %s", i, |
403 SystemDictionary::loader_name(p1->loader_data(i))); | 403 p1->loader_data(i)->loader_name()); |
404 } | 404 } |
405 if (p1->klass() == NULL) { | 405 if (p1->klass() == NULL) { |
406 tty->print_cr("[... and setting class object]"); | 406 tty->print_cr("[... and setting class object]"); |
407 } | 407 } |
408 } | 408 } |