OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 // are set to the value in "flags", the rest retain the current value | 461 // are set to the value in "flags", the rest retain the current value |
462 // in flags_. | 462 // in flags_. |
463 void SetFlags(intptr_t flags, intptr_t mask) { | 463 void SetFlags(intptr_t flags, intptr_t mask) { |
464 flags_ = (flags_ & ~mask) | (flags & mask); | 464 flags_ = (flags_ & ~mask) | (flags & mask); |
465 } | 465 } |
466 | 466 |
467 // Return all current flags. | 467 // Return all current flags. |
468 intptr_t GetFlags() { return flags_; } | 468 intptr_t GetFlags() { return flags_; } |
469 | 469 |
470 | 470 |
471 // PARALLEL_SWEEPING_PENDING - This page is ready for parallel sweeping. | |
472 // PARALLEL_SWEEPING_IN_PROGRESS - This page is currently swept or was | |
473 // swept by a sweeper thread. | |
474 // PARALLEL_SWEEPING_DONE - The page state when sweeping is complete or | 471 // PARALLEL_SWEEPING_DONE - The page state when sweeping is complete or |
475 // sweeping must not be performed on that page. | 472 // sweeping must not be performed on that page. |
| 473 // PARALLEL_SWEEPING_FINALIZE - A sweeper thread is done sweeping this |
| 474 // page and will not touch the page memory anymore. |
| 475 // PARALLEL_SWEEPING_IN_PROGRESS - This page is currently swept by a |
| 476 // sweeper thread. |
| 477 // PARALLEL_SWEEPING_PENDING - This page is ready for parallel sweeping. |
476 enum ParallelSweepingState { | 478 enum ParallelSweepingState { |
477 PARALLEL_SWEEPING_DONE, | 479 PARALLEL_SWEEPING_DONE, |
| 480 PARALLEL_SWEEPING_FINALIZE, |
478 PARALLEL_SWEEPING_IN_PROGRESS, | 481 PARALLEL_SWEEPING_IN_PROGRESS, |
479 PARALLEL_SWEEPING_PENDING | 482 PARALLEL_SWEEPING_PENDING |
480 }; | 483 }; |
481 | 484 |
482 ParallelSweepingState parallel_sweeping() { | 485 ParallelSweepingState parallel_sweeping() { |
483 return static_cast<ParallelSweepingState>( | 486 return static_cast<ParallelSweepingState>( |
484 NoBarrier_Load(¶llel_sweeping_)); | 487 NoBarrier_Load(¶llel_sweeping_)); |
485 } | 488 } |
486 | 489 |
487 void set_parallel_sweeping(ParallelSweepingState state) { | 490 void set_parallel_sweeping(ParallelSweepingState state) { |
(...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2978 } | 2981 } |
2979 // Must be small, since an iteration is used for lookup. | 2982 // Must be small, since an iteration is used for lookup. |
2980 static const int kMaxComments = 64; | 2983 static const int kMaxComments = 64; |
2981 }; | 2984 }; |
2982 #endif | 2985 #endif |
2983 | 2986 |
2984 | 2987 |
2985 } } // namespace v8::internal | 2988 } } // namespace v8::internal |
2986 | 2989 |
2987 #endif // V8_SPACES_H_ | 2990 #endif // V8_SPACES_H_ |
OLD | NEW |