Mercurial > hg > truffle
comparison src/share/vm/utilities/taskqueue.hpp @ 375:81cd571500b0
6725697: par compact - rename class ChunkData to RegionData
Reviewed-by: iveresov, tonyp
author | jcoomes |
---|---|
date | Tue, 30 Sep 2008 12:20:22 -0700 |
parents | 1ee8caae33af |
children | 23673011938d |
comparison
equal
deleted
inserted
replaced
374:a4b729f5b611 | 375:81cd571500b0 |
---|---|
555 }; | 555 }; |
556 | 556 |
557 typedef GenericTaskQueue<StarTask> OopStarTaskQueue; | 557 typedef GenericTaskQueue<StarTask> OopStarTaskQueue; |
558 typedef GenericTaskQueueSet<StarTask> OopStarTaskQueueSet; | 558 typedef GenericTaskQueueSet<StarTask> OopStarTaskQueueSet; |
559 | 559 |
560 typedef size_t ChunkTask; // index for chunk | 560 typedef size_t RegionTask; // index for region |
561 typedef GenericTaskQueue<ChunkTask> ChunkTaskQueue; | 561 typedef GenericTaskQueue<RegionTask> RegionTaskQueue; |
562 typedef GenericTaskQueueSet<ChunkTask> ChunkTaskQueueSet; | 562 typedef GenericTaskQueueSet<RegionTask> RegionTaskQueueSet; |
563 | 563 |
564 class ChunkTaskQueueWithOverflow: public CHeapObj { | 564 class RegionTaskQueueWithOverflow: public CHeapObj { |
565 protected: | 565 protected: |
566 ChunkTaskQueue _chunk_queue; | 566 RegionTaskQueue _region_queue; |
567 GrowableArray<ChunkTask>* _overflow_stack; | 567 GrowableArray<RegionTask>* _overflow_stack; |
568 | 568 |
569 public: | 569 public: |
570 ChunkTaskQueueWithOverflow() : _overflow_stack(NULL) {} | 570 RegionTaskQueueWithOverflow() : _overflow_stack(NULL) {} |
571 // Initialize both stealable queue and overflow | 571 // Initialize both stealable queue and overflow |
572 void initialize(); | 572 void initialize(); |
573 // Save first to stealable queue and then to overflow | 573 // Save first to stealable queue and then to overflow |
574 void save(ChunkTask t); | 574 void save(RegionTask t); |
575 // Retrieve first from overflow and then from stealable queue | 575 // Retrieve first from overflow and then from stealable queue |
576 bool retrieve(ChunkTask& chunk_index); | 576 bool retrieve(RegionTask& region_index); |
577 // Retrieve from stealable queue | 577 // Retrieve from stealable queue |
578 bool retrieve_from_stealable_queue(ChunkTask& chunk_index); | 578 bool retrieve_from_stealable_queue(RegionTask& region_index); |
579 // Retrieve from overflow | 579 // Retrieve from overflow |
580 bool retrieve_from_overflow(ChunkTask& chunk_index); | 580 bool retrieve_from_overflow(RegionTask& region_index); |
581 bool is_empty(); | 581 bool is_empty(); |
582 bool stealable_is_empty(); | 582 bool stealable_is_empty(); |
583 bool overflow_is_empty(); | 583 bool overflow_is_empty(); |
584 juint stealable_size() { return _chunk_queue.size(); } | 584 juint stealable_size() { return _region_queue.size(); } |
585 ChunkTaskQueue* task_queue() { return &_chunk_queue; } | 585 RegionTaskQueue* task_queue() { return &_region_queue; } |
586 }; | 586 }; |
587 | 587 |
588 #define USE_ChunkTaskQueueWithOverflow | 588 #define USE_RegionTaskQueueWithOverflow |