Reviewers: danno, Hablich,
Message:
Not sure why the second patch-set showed up here. I was trying to create a
new
code-review for it. Please ignore.
Description:
New flag --perf_basic_prof_only_functions
Restricts linux perf-event code range reporting to functions only (i.e. on
stubs.) While this makes the gathered ticks less accurate, it reduces the
growth of the /tmp/perf-${pid}.map file.
BUG=v8:3453
[email protected],[email protected]
LOG=N
Committed: https://crrev.com/9da3ab661fe7190fcb99bd99db30cf95913d3659
Cr-Commit-Position: refs/heads/master@{#30179}
Please review this at https://codereview.chromium.org/1292743002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+22, -20 lines):
M src/heap/spaces.h
M src/heap/spaces.cc
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index
b1c9557989fd5a12cd0f5e2043572b548c362997..de0c4445e48a0f848f0c95775bdb7e084bd64a42
100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -1460,12 +1460,7 @@ void NewSpace::ResetAllocationInfo() {
while (it.has_next()) {
Bitmap::Clear(it.next());
}
- if (top_on_previous_step_) {
- int bytes_allocated = static_cast<int>(old_top -
top_on_previous_step_);
- heap()->incremental_marking()->Step(bytes_allocated,
-
IncrementalMarking::GC_VIA_STACK_GUARD);
- top_on_previous_step_ = allocation_info_.top();
- }
+ InlineAllocationStep(old_top, allocation_info_.top());
}
@@ -1544,13 +1539,7 @@ bool NewSpace::EnsureAllocation(int size_in_bytes,
return false;
}
- if (top_on_previous_step_) {
- // Do a step for the bytes allocated on the last page.
- int bytes_allocated = static_cast<int>(old_top -
top_on_previous_step_);
- heap()->incremental_marking()->Step(
- bytes_allocated, IncrementalMarking::GC_VIA_STACK_GUARD);
- top_on_previous_step_ = allocation_info_.top();
- }
+ InlineAllocationStep(old_top, allocation_info_.top());
old_top = allocation_info_.top();
high = to_space_.page_high();
@@ -1564,19 +1553,23 @@ bool NewSpace::EnsureAllocation(int size_in_bytes,
// Either the limit has been lowered because linear allocation was
disabled
// or because incremental marking wants to get a chance to do a step.
Set
// the new limit accordingly.
- if (top_on_previous_step_) {
- Address new_top = old_top + aligned_size_in_bytes;
- int bytes_allocated = static_cast<int>(new_top -
top_on_previous_step_);
- heap()->incremental_marking()->Step(
- bytes_allocated, IncrementalMarking::GC_VIA_STACK_GUARD);
- top_on_previous_step_ = new_top;
- }
+ Address new_top = old_top + aligned_size_in_bytes;
+ InlineAllocationStep(new_top, new_top);
UpdateInlineAllocationLimit(aligned_size_in_bytes);
}
return true;
}
+void NewSpace::InlineAllocationStep(Address top, Address new_top) {
+ if (top_on_previous_step_) {
+ int bytes_allocated = static_cast<int>(top - top_on_previous_step_);
+ heap()->incremental_marking()->Step(
+ bytes_allocated, IncrementalMarking::GC_VIA_STACK_GUARD);
+ top_on_previous_step_ = new_top;
+ }
+}
+
#ifdef VERIFY_HEAP
// We do not use the SemiSpaceIterator because verification doesn't assume
// that it works (it depends on the invariants we are checking).
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index
e7a0334084e8ddc166b6845bb1aef9a5670542b0..4be6f8ca5fb7dbeb20c6eb2244c9c151fc1b788f
100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -2722,6 +2722,15 @@ class NewSpace : public Space {
bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment);
+ // If we are doing inline allocation in steps, this method performs
the 'step'
+ // operation. Right now incremental mark is the only consumer of inline
+ // allocation steps. `top` the address just past the last byte
allocated, i.e.
+ // determines the numbers of bytes actually allocated since the last
step.
+ // `new_top` is the address where that the next byte is going be
allocated
+ // from. `top` and `new_top` may be different when we cross a page
boundary or
+ // reset the space.
+ void InlineAllocationStep(Address top, Address new_top);
+
friend class SemiSpaceIterator;
};
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.