Revert "[heap] Improve embedder tracing during incremental marking"

This reverts commit caed2cc033b846bab17608318f4073852eaf4f9d.

Reason for revert: Breaks layout tests, e.g.

https://test-results.appspot.com/data/layout_results/V8-Blink_Linux_64__dbg_/14924/webkit_layout_tests%20%28with%20patch%29/layout-test-results/results.html

crash log for renderer (pid <unknown>):
STDOUT: <empty>
STDERR: 
STDERR: 
STDERR: #
STDERR: # Fatal error in ../../v8/src/base/platform/elapsed-timer.h, line 24
STDERR: # Debug check failed: !IsStarted().
STDERR: #
STDERR: #
STDERR: #
STDERR: #FailureMessage Object: 0x7ffc46707640#0 0x565409263b6f base::debug::StackTrace::StackTrace()
STDERR: #1 0x56540a8a32fb gin::(anonymous namespace)::PrintStackTrace()
STDERR: #2 0x56540a8980d8 V8_Fatal()
STDERR: #3 0x56540a897e35 v8::base::(anonymous namespace)::DefaultDcheckHandler()
STDERR: #4 0x565407971f02 v8::base::ElapsedTimer::Start()
STDERR: #5 0x565407d08edf v8::internal::TimedHistogram::Start()
STDERR: #6 0x565407e500d5 v8::internal::IncrementalMarking::AdvanceIncrementalMarkingOnAllocation()
STDERR: #7 0x565407e4f977 v8::internal::IncrementalMarking::Observer::Step()
STDERR: #8 0x565407e48092 v8::internal::AllocationObserver::AllocationStep()
STDERR: #9 0x565407eb0751 v8::internal::SpaceWithLinearArea::InlineAllocationStep()
STDERR: #10 0x565407eb3e44 v8::internal::NewSpace::EnsureAllocation()
STDERR: #11 0x565407e258ff v8::internal::NewSpace::AllocateRaw()
STDERR: #12 0x565407e06b2d v8::internal::Heap::AllocateRaw()
STDERR: #13 0x565407e432ef v8::internal::Heap::AllocateRawWithLightRetry()
STDERR: #14 0x565407e433cf v8::internal::Heap::AllocateRawWithRetryOrFail()
STDERR: #15 0x565407e04d48 v8::internal::Factory::NewFixedArrayWithFiller()
STDERR: #16 0x565407fd6339 v8::internal::HashTable<>::New()
STDERR: #17 0x565407fd7be8 v8::internal::HashTable<>::EnsureCapacity()
STDERR: #18 0x565407fc7e95 v8::internal::Dictionary<>::Add()
STDERR: #19 0x565407fcf453 v8::internal::BaseNameDictionary<>::Add()
STDERR: #20 0x565407f89ee4 v8::internal::LookupIterator::ApplyTransitionToDataProperty()
STDERR: #21 0x5654080036e2 v8::internal::Object::AddDataProperty()
STDERR: #22 0x56540793061f v8::internal::(anonymous namespace)::DefineDataProperty()
STDERR: #23 0x56540792da59 v8::internal::(anonymous namespace)::InstantiateObject()
STDERR: #24 0x56540792b75a v8::internal::(anonymous namespace)::InstantiateFunction()
STDERR: #25 0x56540792b4db v8::internal::ApiNatives::InstantiateFunction()
STDERR: #26 0x5654079594bf v8::FunctionTemplate::GetFunction()
STDERR: #27 0x56540a7af74e blink::V8ObjectConstructor::CreateInterfaceObject()
STDERR: #28 0x56540a7afe01 blink::V8PerContextData::ConstructorForTypeSlowCase()
STDERR: #29 0x56540a7afdd6 blink::V8PerContextData::ConstructorForTypeSlowCase()
STDERR: #30 0x56540a7afdd6 blink::V8PerContextData::ConstructorForTypeSlowCase()
STDERR: #31 0x56540a7afcb4 blink::V8PerContextData::CreateWrapperFromCacheSlowCase()
STDERR: #32 0x56540a7aef73 blink::V8DOMWrapper::CreateWrapper()
STDERR: #33 0x56540a7abf6b blink::ScriptWrappable::Wrap()
STDERR: #34 0x56540a677199 blink::V8Document::documentElementAttributeGetterCallback()
STDERR: #35 0x565407a0aec3 v8::internal::FunctionCallbackArguments::Call()
STDERR: #36 0x565407a097be v8::internal::(anonymous namespace)::HandleApiCallHelper<>()
STDERR: #37 0x565407a0877b v8::internal::Builtins::InvokeApiFunction()
STDERR: #38 0x565407fe785a v8::internal::Object::GetPropertyWithAccessor()
STDERR: #39 0x565407fe697e v8::internal::Object::GetProperty()
STDERR: #40 0x565407ec8c71 v8::internal::LoadIC::Load()
STDERR: #41 0x565407ed6401 v8::internal::__RT_impl_Runtime_LoadIC_Miss()
STDERR: #42 0x5654087593f2 <unknown>
STDERR: [16162:16185:1122/143518.356897:WARNING:crash_handler_host_linux.cc(341)] Could not translate tid, attempt = 1 retry ...


Original change's description:
> [heap] Improve embedder tracing during incremental marking
> 
> Add a path into embedder tracing on allocation. This is safe as as Blink
> is not allowed to call into V8 during object construction.
> 
> Bug: chromium:843903
> Change-Id: I5af053c3169f5a33778ebce5d7c5c43e4efb1aa4
> Reviewed-on: https://chromium-review.googlesource.com/c/1348749
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57757}

TBR=ulan@chromium.org,mlippautz@chromium.org

Change-Id: Ide2c0b284b52bee17573adcc89f14be4e40dab91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:843903
Reviewed-on: https://chromium-review.googlesource.com/c/1349189
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57759}
4 files changed
tree: deee588c91d15a6132fe433f2abd757de804ba78
  1. benchmarks/
  2. build_overrides/
  3. custom_deps/
  4. docs/
  5. gni/
  6. include/
  7. infra/
  8. samples/
  9. src/
  10. test/
  11. testing/
  12. third_party/
  13. tools/
  14. .clang-format
  15. .clang-tidy
  16. .editorconfig
  17. .git-blame-ignore-revs
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .vpython
  22. .ycm_extra_conf.py
  23. AUTHORS
  24. BUILD.gn
  25. ChangeLog
  26. CODE_OF_CONDUCT.md
  27. codereview.settings
  28. DEPS
  29. LICENSE
  30. LICENSE.fdlibm
  31. LICENSE.strongtalk
  32. LICENSE.v8
  33. LICENSE.valgrind
  34. OWNERS
  35. PRESUBMIT.py
  36. README.md
  37. snapshot_toolchain.gni
  38. WATCHLISTS
README.md

V8 JavaScript Engine

V8 is Google's open source JavaScript engine.

V8 implements ECMAScript as specified in ECMA-262.

V8 is written in C++ and is used in Google Chrome, the open source browser from Google.

V8 can run standalone, or can be embedded into any C++ application.

V8 Project page: https://github.com/v8/v8/wiki

Getting the Code

Checkout depot tools, and run

    fetch v8

This will checkout V8 into the directory v8 and fetch all of its dependencies. To stay up to date, run

    git pull origin
    gclient sync

For fetching all branches, add the following into your remote configuration in .git/config:

    fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
    fetch = +refs/tags/*:refs/tags/*

Contributing

Please follow the instructions mentioned on the V8 wiki.