Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/thread.hpp @ 989:148e5441d916
6863023: need non-perm oops in code cache for JSR 292
Summary: Make a special root-list for those few nmethods which might contain non-perm oops.
Reviewed-by: twisti, kvn, never, jmasa, ysr
author | jrose |
---|---|
date | Tue, 15 Sep 2009 21:53:47 -0700 |
parents | bd02caa94611 |
children | 46b819ba120b |
comparison
equal
deleted
inserted
replaced
987:00977607da34 | 989:148e5441d916 |
---|---|
372 _current_waiting_monitor = monitor; | 372 _current_waiting_monitor = monitor; |
373 } | 373 } |
374 | 374 |
375 // GC support | 375 // GC support |
376 // Apply "f->do_oop" to all root oops in "this". | 376 // Apply "f->do_oop" to all root oops in "this". |
377 void oops_do(OopClosure* f); | 377 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames |
378 void oops_do(OopClosure* f, CodeBlobClosure* cf); | |
378 | 379 |
379 // Handles the parallel case for the method below. | 380 // Handles the parallel case for the method below. |
380 private: | 381 private: |
381 bool claim_oops_do_par_case(int collection_parity); | 382 bool claim_oops_do_par_case(int collection_parity); |
382 public: | 383 public: |
396 return claim_oops_do_par_case(collection_parity); | 397 return claim_oops_do_par_case(collection_parity); |
397 } | 398 } |
398 } | 399 } |
399 | 400 |
400 // Sweeper support | 401 // Sweeper support |
401 void nmethods_do(); | 402 void nmethods_do(CodeBlobClosure* cf); |
402 | 403 |
403 // Tells if adr belong to this thread. This is used | 404 // Tells if adr belong to this thread. This is used |
404 // for checking if a lock is owned by the running thread. | 405 // for checking if a lock is owned by the running thread. |
405 | 406 |
406 // Used by fast lock support | 407 // Used by fast lock support |
1236 | 1237 |
1237 // Frame iteration; calls the function f for all frames on the stack | 1238 // Frame iteration; calls the function f for all frames on the stack |
1238 void frames_do(void f(frame*, const RegisterMap*)); | 1239 void frames_do(void f(frame*, const RegisterMap*)); |
1239 | 1240 |
1240 // Memory operations | 1241 // Memory operations |
1241 void oops_do(OopClosure* f); | 1242 void oops_do(OopClosure* f, CodeBlobClosure* cf); |
1242 | 1243 |
1243 // Sweeper operations | 1244 // Sweeper operations |
1244 void nmethods_do(); | 1245 void nmethods_do(CodeBlobClosure* cf); |
1245 | 1246 |
1246 // Memory management operations | 1247 // Memory management operations |
1247 void gc_epilogue(); | 1248 void gc_epilogue(); |
1248 void gc_prologue(); | 1249 void gc_prologue(); |
1249 | 1250 |
1627 // Garbage collection | 1628 // Garbage collection |
1628 static void follow_other_roots(void f(oop*)); | 1629 static void follow_other_roots(void f(oop*)); |
1629 | 1630 |
1630 // Apply "f->do_oop" to all root oops in all threads. | 1631 // Apply "f->do_oop" to all root oops in all threads. |
1631 // This version may only be called by sequential code. | 1632 // This version may only be called by sequential code. |
1632 static void oops_do(OopClosure* f); | 1633 static void oops_do(OopClosure* f, CodeBlobClosure* cf); |
1633 // This version may be called by sequential or parallel code. | 1634 // This version may be called by sequential or parallel code. |
1634 static void possibly_parallel_oops_do(OopClosure* f); | 1635 static void possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* cf); |
1635 // This creates a list of GCTasks, one per thread. | 1636 // This creates a list of GCTasks, one per thread. |
1636 static void create_thread_roots_tasks(GCTaskQueue* q); | 1637 static void create_thread_roots_tasks(GCTaskQueue* q); |
1637 // This creates a list of GCTasks, one per thread, for marking objects. | 1638 // This creates a list of GCTasks, one per thread, for marking objects. |
1638 static void create_thread_roots_marking_tasks(GCTaskQueue* q); | 1639 static void create_thread_roots_marking_tasks(GCTaskQueue* q); |
1639 | 1640 |
1640 // Apply "f->do_oop" to roots in all threads that | 1641 // Apply "f->do_oop" to roots in all threads that |
1641 // are part of compiled frames | 1642 // are part of compiled frames |
1642 static void compiled_frame_oops_do(OopClosure* f); | 1643 static void compiled_frame_oops_do(OopClosure* f, CodeBlobClosure* cf); |
1643 | 1644 |
1644 static void convert_hcode_pointers(); | 1645 static void convert_hcode_pointers(); |
1645 static void restore_hcode_pointers(); | 1646 static void restore_hcode_pointers(); |
1646 | 1647 |
1647 // Sweeper | 1648 // Sweeper |
1648 static void nmethods_do(); | 1649 static void nmethods_do(CodeBlobClosure* cf); |
1649 | 1650 |
1650 static void gc_epilogue(); | 1651 static void gc_epilogue(); |
1651 static void gc_prologue(); | 1652 static void gc_prologue(); |
1652 | 1653 |
1653 // Verification | 1654 // Verification |