| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 80d99d8b689f704ce475f3d96a2978ae2e339631..ab3e0bef6abc43f38bebfed85a5281e04e9e09d1 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -95,7 +95,8 @@ namespace internal {
|
| V(StoreGlobal) \
|
| /* IC Handler stubs */ \
|
| V(LoadField) \
|
| - V(KeyedLoadField)
|
| + V(KeyedLoadField) \
|
| + V(RecordObjectAllocation)
|
|
|
| // List of code stubs only used on ARM platforms.
|
| #if V8_TARGET_ARCH_ARM
|
| @@ -1398,6 +1399,27 @@ class JSEntryStub : public PlatformCodeStub {
|
| };
|
|
|
|
|
| +// Report JS object allocation to heap profiler if allocations tracking mode
|
| +// is on.
|
| +class RecordObjectAllocationStub : public PlatformCodeStub {
|
| + public:
|
| + RecordObjectAllocationStub() {}
|
| +
|
| + virtual void Generate(MacroAssembler* masm);
|
| +
|
| + private:
|
| + // This code stub never causes GC.
|
| + virtual bool SometimesSetsUpAFrame() { return false; }
|
| +
|
| + virtual Major MajorKey() { return RecordObjectAllocation; }
|
| + virtual int MinorKey() { return 0; }
|
| +
|
| + virtual void PrintName(StringStream* stream) {
|
| + stream->Add("RecordObjectAllocationStub");
|
| + }
|
| +};
|
| +
|
| +
|
| class JSConstructEntryStub : public JSEntryStub {
|
| public:
|
| JSConstructEntryStub() { }
|
|
|