1 /* 2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 #include "precompiled.hpp" 25 #include "code/relocInfo.hpp" 26 #include "code/nmethod.hpp" 27 #include "code/icBuffer.hpp" 28 #include "gc/shared/barrierSet.hpp" 29 #include "gc/shared/barrierSetNMethod.hpp" 30 #include "gc/z/zArray.inline.hpp" 31 #include "gc/z/zGlobals.hpp" 32 #include "gc/z/zHash.inline.hpp" 33 #include "gc/z/zLock.inline.hpp" 34 #include "gc/z/zNMethodTable.hpp" 35 #include "gc/z/zOopClosures.inline.hpp" 36 #include "gc/z/zTask.hpp" 37 #include "gc/z/zWorkers.hpp" 38 #include "logging/log.hpp" 39 #include "memory/allocation.inline.hpp" 40 #include "memory/resourceArea.hpp" 41 #include "runtime/atomic.hpp" 42 #include "runtime/orderAccess.hpp" 43 #include "utilities/debug.hpp" 44 45 class ZNMethodDataOops { 46 private: 47 const size_t _nimmediates; 48 bool _has_non_immediates; 49 50 static size_t header_size(); 51 52 ZNMethodDataOops(const GrowableArray<oop*>& immediates, bool has_non_immediates); 53 54 public: 55 static ZNMethodDataOops* create(const GrowableArray<oop*>& immediates, bool has_non_immediates); 56 static void destroy(ZNMethodDataOops* oops); 57 58 size_t immediates_count() const; 59 oop** immediates_begin() const; 60 oop** immediates_end() const; 61 62 bool has_non_immediates() const; 63 }; 64 65 size_t ZNMethodDataOops::header_size() { 66 const size_t size = sizeof(ZNMethodDataOops); 67 assert(is_aligned(size, sizeof(oop*)), "Header misaligned"); 68 return size; 69 } 70 71 ZNMethodDataOops* ZNMethodDataOops::create(const GrowableArray<oop*>& immediates, bool has_non_immediates) { 72 // Allocate memory for the ZNMethodDataOops object 73 // plus the immediate oop* array that follows right after. 74 const size_t size = ZNMethodDataOops::header_size() + (sizeof(oop*) * immediates.length()); 75 void* const data = NEW_C_HEAP_ARRAY(uint8_t, size, mtGC); 76 return ::new (data) ZNMethodDataOops(immediates, has_non_immediates); 77 } 78 79 void ZNMethodDataOops::destroy(ZNMethodDataOops* oops) { 80 ZNMethodTable::safe_delete(oops); 81 } 82 83 ZNMethodDataOops::ZNMethodDataOops(const GrowableArray<oop*>& immediates, bool has_non_immediates) : 84 _nimmediates(immediates.length()), 85 _has_non_immediates(has_non_immediates) { 86 // Save all immediate oops 87 for (size_t i = 0; i < _nimmediates; i++) { 88 immediates_begin()[i] = immediates.at(i); 89 } 90 } 91 92 size_t ZNMethodDataOops::immediates_count() const { 93 return _nimmediates; 94 } 95 96 oop** ZNMethodDataOops::immediates_begin() const { 97 // The immediate oop* array starts immediately after this object 98 return (oop**)((uintptr_t)this + header_size()); 99 } 100 101 oop** ZNMethodDataOops::immediates_end() const { 102 return immediates_begin() + immediates_count(); 103 } 104 105 bool ZNMethodDataOops::has_non_immediates() const { 106 return _has_non_immediates; 107 } 108 109 class ZNMethodData { 110 private: 111 ZReentrantLock _lock; 112 ZNMethodDataOops* volatile _oops; 113 114 ZNMethodData(nmethod* nm); 115 116 public: 117 static ZNMethodData* create(nmethod* nm); 118 static void destroy(ZNMethodData* data); 119 120 ZReentrantLock* lock(); 121 122 ZNMethodDataOops* oops() const; 123 ZNMethodDataOops* swap_oops(ZNMethodDataOops* oops); 124 }; 125 126 ZNMethodData* ZNMethodData::create(nmethod* nm) { 127 void* const method = NEW_C_HEAP_ARRAY(uint8_t, sizeof(ZNMethodData), mtGC); 128 return ::new (method) ZNMethodData(nm); 129 } 130 131 void ZNMethodData::destroy(ZNMethodData* data) { 132 ZNMethodDataOops::destroy(data->oops()); 133 ZNMethodTable::safe_delete(data); 134 } 135 136 ZNMethodData::ZNMethodData(nmethod* nm) : 137 _lock(), 138 _oops(NULL) {} 139 140 ZReentrantLock* ZNMethodData::lock() { 141 return &_lock; 142 } 143 144 ZNMethodDataOops* ZNMethodData::oops() const { 145 return OrderAccess::load_acquire(&_oops); 146 } 147 148 ZNMethodDataOops* ZNMethodData::swap_oops(ZNMethodDataOops* new_oops) { 149 return Atomic::xchg(new_oops, &_oops); 150 } 151 152 static ZNMethodData* gc_data(const nmethod* nm) { 153 return nm->gc_data<ZNMethodData>(); 154 } 155 156 static void set_gc_data(nmethod* nm, ZNMethodData* data) { 157 return nm->set_gc_data<ZNMethodData>(data); 158 } 159 160 ZNMethodTableEntry* ZNMethodTable::_table = NULL; 161 size_t ZNMethodTable::_size = 0; 162 ZNMethodTableEntry* ZNMethodTable::_iter_table = NULL; 163 size_t ZNMethodTable::_iter_table_size = 0; 164 ZArray<void*> ZNMethodTable::_iter_deferred_deletes; 165 size_t ZNMethodTable::_nregistered = 0; 166 size_t ZNMethodTable::_nunregistered = 0; 167 volatile size_t ZNMethodTable::_claimed = 0; 168 169 void ZNMethodTable::safe_delete(void* data) { 170 assert(CodeCache_lock->owned_by_self(), "Lock must be held"); 171 172 if (data == NULL) { 173 return; 174 } 175 176 if (_iter_table != NULL) { 177 // Iteration in progress, defer delete 178 _iter_deferred_deletes.add(data); 179 } else { 180 // Iteration not in progress, delete now 181 FREE_C_HEAP_ARRAY(uint8_t, data); 182 } 183 } 184 185 void ZNMethodTable::attach_gc_data(nmethod* nm) { 186 GrowableArray<oop*> immediate_oops; 187 bool non_immediate_oops = false; 188 189 // Find all oops relocations 190 RelocIterator iter(nm); 191 while (iter.next()) { 192 if (iter.type() != relocInfo::oop_type) { 193 // Not an oop 194 continue; 195 } 196 197 oop_Relocation* r = iter.oop_reloc(); 198 199 if (!r->oop_is_immediate()) { 200 // Non-immediate oop found 201 non_immediate_oops = true; 202 continue; 203 } 204 205 if (r->oop_value() != NULL) { 206 // Non-NULL immediate oop found. NULL oops can safely be 207 // ignored since the method will be re-registered if they 208 // are later patched to be non-NULL. 209 immediate_oops.push(r->oop_addr()); 210 } 211 } 212 213 // Attach GC data to nmethod 214 ZNMethodData* data = gc_data(nm); 215 if (data == NULL) { 216 data = ZNMethodData::create(nm); 217 set_gc_data(nm, data); 218 } 219 220 // Attach oops in GC data 221 ZNMethodDataOops* const new_oops = ZNMethodDataOops::create(immediate_oops, non_immediate_oops); 222 ZNMethodDataOops* const old_oops = data->swap_oops(new_oops); 223 ZNMethodDataOops::destroy(old_oops); 224 } 225 226 void ZNMethodTable::detach_gc_data(nmethod* nm) { 227 // Destroy GC data 228 ZNMethodData::destroy(gc_data(nm)); 229 set_gc_data(nm, NULL); 230 } 231 232 ZReentrantLock* ZNMethodTable::lock_for_nmethod(nmethod* nm) { 233 ZNMethodData* const data = gc_data(nm); 234 if (data == NULL) { 235 return NULL; 236 } 237 return data->lock(); 238 } 239 240 size_t ZNMethodTable::first_index(const nmethod* nm, size_t size) { 241 assert(is_power_of_2(size), "Invalid size"); 242 const size_t mask = size - 1; 243 const size_t hash = ZHash::address_to_uint32((uintptr_t)nm); 244 return hash & mask; 245 } 246 247 size_t ZNMethodTable::next_index(size_t prev_index, size_t size) { 248 assert(is_power_of_2(size), "Invalid size"); 249 const size_t mask = size - 1; 250 return (prev_index + 1) & mask; 251 } 252 253 bool ZNMethodTable::register_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm) { 254 const ZNMethodTableEntry entry(nm); 255 size_t index = first_index(nm, size); 256 257 for (;;) { 258 const ZNMethodTableEntry table_entry = table[index]; 259 260 if (!table_entry.registered() && !table_entry.unregistered()) { 261 // Insert new entry 262 table[index] = entry; 263 return true; 264 } 265 266 if (table_entry.registered() && table_entry.method() == nm) { 267 // Replace existing entry 268 table[index] = entry; 269 return false; 270 } 271 272 index = next_index(index, size); 273 } 274 } 275 276 void ZNMethodTable::unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm) { 277 size_t index = first_index(nm, size); 278 279 for (;;) { 280 const ZNMethodTableEntry table_entry = table[index]; 281 assert(table_entry.registered() || table_entry.unregistered(), "Entry not found"); 282 283 if (table_entry.registered() && table_entry.method() == nm) { 284 // Remove entry 285 table[index] = ZNMethodTableEntry(true /* unregistered */); 286 return; 287 } 288 289 index = next_index(index, size); 290 } 291 } 292 293 void ZNMethodTable::rebuild(size_t new_size) { 294 assert(CodeCache_lock->owned_by_self(), "Lock must be held"); 295 296 assert(is_power_of_2(new_size), "Invalid size"); 297 298 log_debug(gc, nmethod)("Rebuilding NMethod Table: " 299 SIZE_FORMAT "->" SIZE_FORMAT " entries, " 300 SIZE_FORMAT "(%.0lf%%->%.0lf%%) registered, " 301 SIZE_FORMAT "(%.0lf%%->%.0lf%%) unregistered", 302 _size, new_size, 303 _nregistered, percent_of(_nregistered, _size), percent_of(_nregistered, new_size), 304 _nunregistered, percent_of(_nunregistered, _size), 0.0); 305 306 // Allocate new table 307 ZNMethodTableEntry* const new_table = new ZNMethodTableEntry[new_size]; 308 309 // Transfer all registered entries 310 for (size_t i = 0; i < _size; i++) { 311 const ZNMethodTableEntry entry = _table[i]; 312 if (entry.registered()) { 313 register_entry(new_table, new_size, entry.method()); 314 } 315 } 316 317 if (_iter_table != _table) { 318 // Delete old table 319 delete [] _table; 320 } 321 322 // Install new table 323 _table = new_table; 324 _size = new_size; 325 _nunregistered = 0; 326 } 327 328 void ZNMethodTable::rebuild_if_needed() { 329 // The hash table uses linear probing. To avoid wasting memory while 330 // at the same time maintaining good hash collision behavior we want 331 // to keep the table occupancy between 30% and 70%. The table always 332 // grows/shrinks by doubling/halving its size. Pruning of unregistered 333 // entries is done by rebuilding the table with or without resizing it. 334 const size_t min_size = 1024; 335 const size_t shrink_threshold = _size * 0.30; 336 const size_t prune_threshold = _size * 0.65; 337 const size_t grow_threshold = _size * 0.70; 338 339 if (_size == 0) { 340 // Initialize table 341 rebuild(min_size); 342 } else if (_nregistered < shrink_threshold && _size > min_size) { 343 // Shrink table 344 rebuild(_size / 2); 345 } else if (_nregistered + _nunregistered > grow_threshold) { 346 // Prune or grow table 347 if (_nregistered < prune_threshold) { 348 // Prune table 349 rebuild(_size); 350 } else { 351 // Grow table 352 rebuild(_size * 2); 353 } 354 } 355 } 356 357 void ZNMethodTable::log_register(const nmethod* nm) { 358 LogTarget(Trace, gc, nmethod) log; 359 if (!log.is_enabled()) { 360 return; 361 } 362 363 const ZNMethodDataOops* const oops = gc_data(nm)->oops(); 364 365 log.print("Register NMethod: %s.%s (" PTR_FORMAT "), " 366 "Compiler: %s, Oops: %d, ImmediateOops: " SIZE_FORMAT ", NonImmediateOops: %s", 367 nm->method()->method_holder()->external_name(), 368 nm->method()->name()->as_C_string(), 369 p2i(nm), 370 nm->compiler_name(), 371 nm->oops_count() - 1, 372 oops->immediates_count(), 373 oops->has_non_immediates() ? "Yes" : "No"); 374 375 LogTarget(Trace, gc, nmethod, oops) log_oops; 376 if (!log_oops.is_enabled()) { 377 return; 378 } 379 380 // Print nmethod oops table 381 oop* const begin = nm->oops_begin(); 382 oop* const end = nm->oops_end(); 383 for (oop* p = begin; p < end; p++) { 384 log_oops.print(" Oop[" SIZE_FORMAT "] " PTR_FORMAT " (%s)", 385 (p - begin), p2i(*p), (*p)->klass()->external_name()); 386 } 387 388 // Print nmethod immediate oops 389 if (oops->immediates_count() > 0) { 390 oop** const begin = oops->immediates_begin(); 391 oop** const end = oops->immediates_end(); 392 for (oop** p = begin; p < end; p++) { 393 log_oops.print(" ImmediateOop[" SIZE_FORMAT "] " PTR_FORMAT " @ " PTR_FORMAT " (%s)", 394 (p - begin), p2i(**p), p2i(*p), (**p)->klass()->external_name()); 395 } 396 } 397 } 398 399 void ZNMethodTable::log_unregister(const nmethod* nm) { 400 LogTarget(Debug, gc, nmethod) log; 401 if (!log.is_enabled()) { 402 return; 403 } 404 405 log.print("Unregister NMethod: %s.%s (" PTR_FORMAT ")", 406 nm->method()->method_holder()->external_name(), 407 nm->method()->name()->as_C_string(), 408 p2i(nm)); 409 } 410 411 size_t ZNMethodTable::registered_nmethods() { 412 return _nregistered; 413 } 414 415 size_t ZNMethodTable::unregistered_nmethods() { 416 return _nunregistered; 417 } 418 419 void ZNMethodTable::register_nmethod(nmethod* nm) { 420 assert(CodeCache_lock->owned_by_self(), "Lock must be held"); 421 ResourceMark rm; 422 423 // Grow/Shrink/Prune table if needed 424 rebuild_if_needed(); 425 426 // Create and attach gc data 427 attach_gc_data(nm); 428 429 log_register(nm); 430 431 // Insert new entry 432 if (register_entry(_table, _size, nm)) { 433 // New entry registered. When register_entry() instead returns 434 // false the nmethod was already in the table so we do not want 435 // to increase number of registered entries in that case. 436 _nregistered++; 437 } 438 439 // Disarm nmethod entry barrier 440 disarm_nmethod(nm); 441 } 442 443 void ZNMethodTable::wait_until_iteration_done() { 444 assert(CodeCache_lock->owned_by_self(), "Lock must be held"); 445 446 while (_iter_table != NULL) { 447 CodeCache_lock->wait(Monitor::_no_safepoint_check_flag); 448 } 449 } 450 451 void ZNMethodTable::unregister_nmethod(nmethod* nm) { 452 assert(CodeCache_lock->owned_by_self(), "Lock must be held"); 453 454 if (Thread::current()->is_Code_cache_sweeper_thread()) { 455 // The sweeper must wait for any ongoing iteration to complete 456 // before it can unregister an nmethod. 457 ZNMethodTable::wait_until_iteration_done(); 458 } 459 460 ResourceMark rm; 461 462 log_unregister(nm); 463 464 // Remove entry 465 unregister_entry(_table, _size, nm); 466 _nunregistered++; 467 _nregistered--; 468 469 detach_gc_data(nm); 470 } 471 472 void ZNMethodTable::disarm_nmethod(nmethod* nm) { 473 BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod(); 474 if (bs != NULL) { 475 bs->disarm(nm); 476 } 477 } 478 479 void ZNMethodTable::nmethods_do_begin() { 480 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); 481 482 // Prepare iteration 483 _iter_table = _table; 484 _iter_table_size = _size; 485 _claimed = 0; 486 assert(_iter_deferred_deletes.is_empty(), "Should be emtpy"); 487 } 488 489 void ZNMethodTable::nmethods_do_end() { 490 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); 491 492 // Finish iteration 493 if (_iter_table != _table) { 494 delete [] _iter_table; 495 } 496 _iter_table = NULL; 497 498 assert(_claimed >= _iter_table_size, "Failed to claim all table entries"); 499 500 // Process deferred deletes 501 ZArrayIterator<void*> iter(&_iter_deferred_deletes); 502 for (void* data; iter.next(&data);) { 503 FREE_C_HEAP_ARRAY(uint8_t, data); 504 } 505 _iter_deferred_deletes.clear(); 506 507 // Notify iteration done 508 CodeCache_lock->notify_all(); 509 } 510 511 void ZNMethodTable::oops_do(nmethod* nm, OopClosure* cl) { 512 // Process oops table 513 oop* const begin = nm->oops_begin(); 514 oop* const end = nm->oops_end(); 515 for (oop* p = begin; p < end; p++) { 516 if (*p != Universe::non_oop_word()) { 517 cl->do_oop(p); 518 } 519 } 520 521 ZNMethodDataOops* const oops = gc_data(nm)->oops(); 522 523 // Process immediate oops 524 if (oops->immediates_count() > 0) { 525 oop** const begin = oops->immediates_begin(); 526 oop** const end = oops->immediates_end(); 527 for (oop** p = begin; p < end; p++) { 528 if (**p != Universe::non_oop_word()) { 529 cl->do_oop(*p); 530 } 531 } 532 } 533 534 // Process non-immediate oops 535 if (oops->has_non_immediates()) { 536 nm->fix_oop_relocations(); 537 } 538 } 539 540 class ZNMethodToOopsDo : public ZNMethodClosure { 541 private: 542 OopClosure* _cl; 543 544 public: 545 ZNMethodToOopsDo(OopClosure* cl) : 546 _cl(cl) {} 547 548 void do_nmethod(nmethod* nm) { 549 ZNMethodTable::oops_do(nm, _cl); 550 } 551 }; 552 553 void ZNMethodTable::oops_do(OopClosure* cl) { 554 ZNMethodToOopsDo nm_cl(cl); 555 nmethods_do(&nm_cl); 556 } 557 558 void ZNMethodTable::nmethods_do(ZNMethodClosure* cl) { 559 for (;;) { 560 // Claim table partition. Each partition is currently sized to span 561 // two cache lines. This number is just a guess, but seems to work well. 562 const size_t partition_size = (ZCacheLineSize * 2) / sizeof(ZNMethodTableEntry); 563 const size_t partition_start = MIN2(Atomic::add(partition_size, &_claimed) - partition_size, _iter_table_size); 564 const size_t partition_end = MIN2(partition_start + partition_size, _iter_table_size); 565 if (partition_start == partition_end) { 566 // End of table 567 break; 568 } 569 570 // Process table partition 571 for (size_t i = partition_start; i < partition_end; i++) { 572 const ZNMethodTableEntry entry = _iter_table[i]; 573 if (entry.registered()) { 574 cl->do_nmethod(entry.method()); 575 } 576 } 577 } 578 } 579 580 class ZNMethodTableUnlinkClosure : public ZNMethodClosure { 581 private: 582 bool _unloading_occurred; 583 volatile bool _failed; 584 585 void set_failed() { 586 Atomic::store(true, &_failed); 587 } 588 589 public: 590 ZNMethodTableUnlinkClosure(bool unloading_occurred) : 591 _unloading_occurred(unloading_occurred), 592 _failed(false) {} 593 594 virtual void do_nmethod(nmethod* nm) { 595 if (failed()) { 596 return; 597 } 598 599 if (!nm->is_alive()) { 600 return; 601 } 602 603 ZLocker<ZReentrantLock> locker(ZNMethodTable::lock_for_nmethod(nm)); 604 605 if (nm->is_unloading()) { 606 // Unlinking of the dependencies must happen before the 607 // handshake separating unlink and purge. 608 nm->flush_dependencies(false /* delete_immediately */); 609 610 // We don't need to take the lock when unlinking nmethods from 611 // the Method, because it is only concurrently unlinked by 612 // the entry barrier, which acquires the per nmethod lock. 613 nm->unlink_from_method(false /* acquire_lock */); 614 return; 615 } 616 617 // Heal oops and disarm 618 ZNMethodOopClosure cl; 619 ZNMethodTable::oops_do(nm, &cl); 620 ZNMethodTable::disarm_nmethod(nm); 621 622 // Clear compiled ICs and exception caches 623 if (!nm->unload_nmethod_caches(_unloading_occurred)) { 624 set_failed(); 625 } 626 } 627 628 bool failed() const { 629 return Atomic::load(&_failed); 630 } 631 }; 632 633 class ZNMethodTableUnlinkTask : public ZTask { 634 private: 635 ZNMethodTableUnlinkClosure _cl; 636 ICRefillVerifier* _verifier; 637 638 public: 639 ZNMethodTableUnlinkTask(bool unloading_occurred, ICRefillVerifier* verifier) : 640 ZTask("ZNMethodTableUnlinkTask"), 641 _cl(unloading_occurred), 642 _verifier(verifier) { 643 ZNMethodTable::nmethods_do_begin(); 644 } 645 646 ~ZNMethodTableUnlinkTask() { 647 ZNMethodTable::nmethods_do_end(); 648 } 649 650 virtual void work() { 651 ICRefillVerifierMark mark(_verifier); 652 ZNMethodTable::nmethods_do(&_cl); 653 } 654 655 bool success() const { 656 return !_cl.failed(); 657 } 658 }; 659 660 void ZNMethodTable::unlink(ZWorkers* workers, bool unloading_occurred) { 661 for (;;) { 662 ICRefillVerifier verifier; 663 664 { 665 ZNMethodTableUnlinkTask task(unloading_occurred, &verifier); 666 workers->run_concurrent(&task); 667 if (task.success()) { 668 return; 669 } 670 } 671 672 // Cleaning failed because we ran out of transitional IC stubs, 673 // so we have to refill and try again. Refilling requires taking 674 // a safepoint, so we temporarily leave the suspendible thread set. 675 SuspendibleThreadSetLeaver sts; 676 InlineCacheBuffer::refill_ic_stubs(); 677 } 678 } 679 680 class ZNMethodTablePurgeClosure : public ZNMethodClosure { 681 public: 682 virtual void do_nmethod(nmethod* nm) { 683 if (nm->is_alive() && nm->is_unloading()) { 684 nm->make_unloaded(); 685 } 686 } 687 }; 688 689 class ZNMethodTablePurgeTask : public ZTask { 690 private: 691 ZNMethodTablePurgeClosure _cl; 692 693 public: 694 ZNMethodTablePurgeTask() : 695 ZTask("ZNMethodTablePurgeTask"), 696 _cl() { 697 ZNMethodTable::nmethods_do_begin(); 698 } 699 700 ~ZNMethodTablePurgeTask() { 701 ZNMethodTable::nmethods_do_end(); 702 } 703 704 virtual void work() { 705 ZNMethodTable::nmethods_do(&_cl); 706 } 707 }; 708 709 void ZNMethodTable::purge(ZWorkers* workers) { 710 ZNMethodTablePurgeTask task; 711 workers->run_concurrent(&task); 712 }