void AtLeast(size_t new_min_old_gen_limit, size_t new_min_global_limit) {This method and the next one are new. I am adding a test for them as well. But we don't use them yet.
UpdateAllocationLimits(LimitBounds::AtMostCurrentLimits(this),Drive-by: Use different caller to make it obvious whether UpdateAllocationLimits was called from major or minor GC.
TRACE_GC_EPOCH_WITH_FLOW(tracer(), GCTracer::Scope::MC_COMPLETE_SWEEPING,This event already exists within the sweeper. That's why I remove it here and instead add ENSURE_SWEEPING_COMPLETED at the beginning of the method.
!using_initial_limit()) {In a subsequent CL we can then disable calling UpdateAllocationLimits() based on CompleteSweepingReason.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
enum class CompleteSweepingReason {nit: Some enums are easier to use when not being nested inside `Heap`. We already have a bunch of them and maybe this one should also go outside. (Judge yourself)
void AtLeast(size_t new_min_old_gen_limit, size_t new_min_global_limit) {This method and the next one are new. I am adding a test for them as well. But we don't use them yet.
Acknowledged
UpdateAllocationLimits(LimitBounds::AtMostCurrentLimits(this),Drive-by: Use different caller to make it obvious whether UpdateAllocationLimits was called from major or minor GC.
Shouldn't you add a string above then as well? So either adjust both or none?
TRACE_GC_EPOCH_WITH_FLOW(tracer(), GCTracer::Scope::MC_COMPLETE_SWEEPING,This event already exists within the sweeper. That's why I remove it here and instead add ENSURE_SWEEPING_COMPLETED at the beginning of the method.
Acknowledged
if (v8_flags.trace_gc_verbose) {[[unlikely]]
!using_initial_limit()) {In a subsequent CL we can then disable calling UpdateAllocationLimits() based on CompleteSweepingReason.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
nit: Some enums are easier to use when not being nested inside `Heap`. We already have a bunch of them and maybe this one should also go outside. (Judge yourself)
Yes absolutely. I like it.
UpdateAllocationLimits(LimitBounds::AtMostCurrentLimits(this),Michael LippautzDrive-by: Use different caller to make it obvious whether UpdateAllocationLimits was called from major or minor GC.
Shouldn't you add a string above then as well? So either adjust both or none?
So far both call sites used the default value for this method ("RecomputeLimits" - the default values uses __builtin_FUNCTION() or so). It was just a bit confusing to me that both minor and major GC used the same reason - so renaming just one is enough for me to distinguish them. But I might be missing something here.
if (v8_flags.trace_gc_verbose) {Dominik Inführ[[unlikely]]
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
UpdateAllocationLimits(LimitBounds::AtMostCurrentLimits(this),Michael LippautzDrive-by: Use different caller to make it obvious whether UpdateAllocationLimits was called from major or minor GC.
Dominik InführShouldn't you add a string above then as well? So either adjust both or none?
So far both call sites used the default value for this method ("RecomputeLimits" - the default values uses __builtin_FUNCTION() or so). It was just a bit confusing to me that both minor and major GC used the same reason - so renaming just one is enough for me to distinguish them. But I might be missing something here.
You can distinguish but it's not consistent in the terms of strings :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
UpdateAllocationLimits(LimitBounds::AtMostCurrentLimits(this),Michael LippautzDrive-by: Use different caller to make it obvious whether UpdateAllocationLimits was called from major or minor GC.
Dominik InführShouldn't you add a string above then as well? So either adjust both or none?
Michael LippautzSo far both call sites used the default value for this method ("RecomputeLimits" - the default values uses __builtin_FUNCTION() or so). It was just a bit confusing to me that both minor and major GC used the same reason - so renaming just one is enough for me to distinguish them. But I might be missing something here.
You can distinguish but it's not consistent in the terms of strings :)
Ah right, good point. Updated it.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
8 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/heap/heap.cc
Insertions: 2, Deletions: 1.
@@ -2665,7 +2665,8 @@
void Heap::RecomputeLimits(GarbageCollector collector) {
if (collector == GarbageCollector::MARK_COMPACTOR) {
- const LimitsComputationResult new_limits = UpdateAllocationLimits({});
+ const LimitsComputationResult new_limits =
+ UpdateAllocationLimits({}, "RecomputeLimitsAfterMajorGC");
if (v8_flags.memory_balancer) {
// Now recompute the new allocation limit.
```
[heap] Annotate reason for finishing sweeping
This CL adds a new enum CompleteSweepingReason with all reasons for
invoking EnsureSweepingCompleted(). It is also added as an additional
argument to that method.
The CL does not change any GC behavior yet. This will be done in a
follow-up CL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |