Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Issue 43693002: Correctly setup exit frame when calling into allocation tracker (Closed)

Created:
7 years, 1 month ago by yurys
Modified:
7 years, 1 month ago
CC:
v8-dev
Visibility:
Public.

Description

Correctly setup exit frame when calling into allocation tracker The change introduces RecordObjectAllocationStub which is passed newly allocated object address and size as values on the stack. The stub constructs EXIT frame, saves registers, puts arguments into registers in accord with the calling convention and calls into the HeapProfiler. allow_builtins_on_stack flag was added to stack iterators to let them know that we may start iterating stack when paused inside a builtin (this is not uncommon to have heap allocations inside builtins) and that the assert inside StackFrame::ComputeType should be relaxed. Before this change we didn't write exit frame pointer into Isolate::c_entry_fp so the stack iteration would fail in many cases. BUG=None

Patch Set 1 #

Patch Set 2 : Introduced stub for reporting allocations #

Patch Set 3 : #

Patch Set 4 : Added comment #

Total comments: 2

Patch Set 5 : Added PrintName #

Total comments: 6

Patch Set 6 : Added AllowStubCallsScope #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -52 lines) Patch
M src/allocation-tracker.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M src/code-stubs.h View 1 2 3 4 2 chunks +23 lines, -1 line 0 comments Download
M src/frames.h View 1 5 chunks +9 lines, -5 lines 0 comments Download
M src/frames.cc View 1 4 chunks +14 lines, -9 lines 0 comments Download
M src/frames-inl.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 1 chunk +25 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 3 chunks +12 lines, -34 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
yurys
I've got a test for this change (https://codereview.chromium.org/43713002/) which I'd love to include into this ...
7 years, 1 month ago (2013-10-25 09:47:10 UTC) #1
yurys
7 years, 1 month ago (2013-10-25 09:56:57 UTC) #2
loislo
lgtm
7 years, 1 month ago (2013-10-28 07:50:30 UTC) #3
yurys
Hannes, can you do OWNER's review please.
7 years, 1 month ago (2013-10-28 07:51:17 UTC) #4
loislo
The patch is failing on x64.debug Program received signal SIGSEGV, Segmentation fault. 0x00000000009275da in v8::internal::MemoryChunk::skip_list ...
7 years, 1 month ago (2013-10-28 08:40:48 UTC) #5
loislo
On 2013/10/28 08:40:48, loislo wrote: > The patch is failing on x64.debug > > Program ...
7 years, 1 month ago (2013-10-28 08:46:12 UTC) #6
yurys
Fixed crash. Also introduced new code stub that makes all preparation and calls HeapProfiler::RecordObjectAllocationFromMasm. PTAL.
7 years, 1 month ago (2013-10-30 10:40:08 UTC) #7
loislo
lgtm
7 years, 1 month ago (2013-10-30 11:30:41 UTC) #8
alph
lgtm https://codereview.chromium.org/43693002/diff/150001/src/code-stubs.h File src/code-stubs.h (right): https://codereview.chromium.org/43693002/diff/150001/src/code-stubs.h#newcode1404 src/code-stubs.h:1404: class RecordObjectAllocationStub : public PlatformCodeStub { Consider overriding ...
7 years, 1 month ago (2013-10-30 11:44:27 UTC) #9
yurys
https://codereview.chromium.org/43693002/diff/150001/src/code-stubs.h File src/code-stubs.h (right): https://codereview.chromium.org/43693002/diff/150001/src/code-stubs.h#newcode1404 src/code-stubs.h:1404: class RecordObjectAllocationStub : public PlatformCodeStub { On 2013/10/30 11:44:27, ...
7 years, 1 month ago (2013-10-30 11:59:53 UTC) #10
yurys
7 years, 1 month ago (2013-10-30 14:05:14 UTC) #11
Yang
I do not agree with this change yet: - We are introducing a new flag ...
7 years, 1 month ago (2013-10-30 15:01:24 UTC) #12
Yang
https://codereview.chromium.org/43693002/diff/200001/src/x64/code-stubs-x64.cc File src/x64/code-stubs-x64.cc (right): https://codereview.chromium.org/43693002/diff/200001/src/x64/code-stubs-x64.cc#newcode5835 src/x64/code-stubs-x64.cc:5835: __ movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); If you need to erect ...
7 years, 1 month ago (2013-10-30 15:12:57 UTC) #13
yurys
On 2013/10/30 15:01:24, Yang wrote: > I do not agree with this change yet: > ...
7 years, 1 month ago (2013-10-31 08:45:07 UTC) #14
yurys
https://codereview.chromium.org/43693002/diff/200001/src/x64/code-stubs-x64.cc File src/x64/code-stubs-x64.cc (right): https://codereview.chromium.org/43693002/diff/200001/src/x64/code-stubs-x64.cc#newcode5835 src/x64/code-stubs-x64.cc:5835: __ movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); On 2013/10/30 15:12:57, Yang wrote: ...
7 years, 1 month ago (2013-10-31 08:56:00 UTC) #15
yurys
https://codereview.chromium.org/43693002/diff/200001/src/x64/macro-assembler-x64.cc File src/x64/macro-assembler-x64.cc (right): https://codereview.chromium.org/43693002/diff/200001/src/x64/macro-assembler-x64.cc#newcode4097 src/x64/macro-assembler-x64.cc:4097: addq(rsp, Immediate(2 * kPointerSize)); On 2013/10/30 15:01:25, Yang wrote: ...
7 years, 1 month ago (2013-10-31 08:57:40 UTC) #16
yurys
-hpayer since he is on vacation, +mstarzinger
7 years, 1 month ago (2013-11-05 08:57:57 UTC) #17
loislo
https://codereview.chromium.org/43693002/diff/200001/src/x64/macro-assembler-x64.cc File src/x64/macro-assembler-x64.cc (right): https://codereview.chromium.org/43693002/diff/200001/src/x64/macro-assembler-x64.cc#newcode4093 src/x64/macro-assembler-x64.cc:4093: push(Immediate(object_size)); please add AllowStubCallsScope allow_scope(this, true); call here. Otherwise ...
7 years, 1 month ago (2013-11-05 08:58:41 UTC) #18
yurys
7 years, 1 month ago (2013-11-05 09:09:12 UTC) #19
https://codereview.chromium.org/43693002/diff/200001/src/x64/macro-assembler-...
File src/x64/macro-assembler-x64.cc (right):

https://codereview.chromium.org/43693002/diff/200001/src/x64/macro-assembler-...
src/x64/macro-assembler-x64.cc:4093: push(Immediate(object_size));
On 2013/11/05 08:58:42, loislo wrote:
> please add  AllowStubCallsScope allow_scope(this, true); call here.
> Otherwise it will fail on compilation StringAdd stub.

Done.

Powered by Google App Engine
This is Rietveld 408576698