1. 15 Nov, 2018 3 commits
    • Jakob Gruber's avatar
      Reland "[builtins] Support embedded builtins in nosnapshot builds" · e1044d10
      Jakob Gruber authored
      This is a reland of bf2f0a02
      
      Original change's description:
      > [builtins] Support embedded builtins in nosnapshot builds
      >
      > This CL adds support for embedded builtins in nosnap builds by creating
      > and setting an 'embedded blob' after builtin generation. Unlike
      > snapshot builds, the blob is not embedded into the .text section but
      > located on the C++ heap.
      >
      > This makes nosnap builds more consistent with mksnapshot, and allows us
      > to simplify there and in serializer cctests.
      >
      > Complications arise from the different workflows we need to support:
      >
      > 1. the standard mksnapshot build process,
      > 2. nosnap builds (which reuse the blob created by the first Isolate),
      > 2. and tests with various complicated serialization workflows.
      >
      > To cover all of these cases, this CL introduces two knobs to twiddle:
      >
      > 1. A 'sticky' embedded blob which overrides compiled-in default
      >    embedded blobs at Isolate setup.
      > 2. The blob lifecycle can be managed manually or through refcounting.
      >
      > These are described in more detail in isolate.cc.
      >
      > Tbr: ulan@chromium.org
      > Bug: v8:6666, v8:8350
      > Change-Id: I3842e40cdaf45d2cadd05c6eb1ec2f5e3d83568d
      > Reviewed-on: https://chromium-review.googlesource.com/c/1310195
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#57523}
      
      Tbr: ulan@chromium.org,yangguo@chromium.org
      Bug: v8:6666, v8:8350
      Change-Id: I13b523c9e7406b39a3cd28465c06f17f1744a738
      Reviewed-on: https://chromium-review.googlesource.com/c/1337578
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57540}
      e1044d10
    • Jakob Gruber's avatar
      Revert "[builtins] Support embedded builtins in nosnapshot builds" · 856be9c2
      Jakob Gruber authored
      This reverts commit bf2f0a02.
      
      Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/21753
      
      Original change's description:
      > [builtins] Support embedded builtins in nosnapshot builds
      > 
      > This CL adds support for embedded builtins in nosnap builds by creating
      > and setting an 'embedded blob' after builtin generation. Unlike
      > snapshot builds, the blob is not embedded into the .text section but
      > located on the C++ heap.
      > 
      > This makes nosnap builds more consistent with mksnapshot, and allows us
      > to simplify there and in serializer cctests.
      > 
      > Complications arise from the different workflows we need to support:
      > 
      > 1. the standard mksnapshot build process,
      > 2. nosnap builds (which reuse the blob created by the first Isolate),
      > 2. and tests with various complicated serialization workflows.
      > 
      > To cover all of these cases, this CL introduces two knobs to twiddle:
      > 
      > 1. A 'sticky' embedded blob which overrides compiled-in default
      >    embedded blobs at Isolate setup.
      > 2. The blob lifecycle can be managed manually or through refcounting.
      > 
      > These are described in more detail in isolate.cc.
      > 
      > Tbr: ulan@chromium.org
      > Bug: v8:6666, v8:8350
      > Change-Id: I3842e40cdaf45d2cadd05c6eb1ec2f5e3d83568d
      > Reviewed-on: https://chromium-review.googlesource.com/c/1310195
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#57523}
      
      TBR=ulan@chromium.org,yangguo@chromium.org,jgruber@chromium.org
      
      Change-Id: I6e35a0cb7186fb50f1012f5c618fb8b48b24a813
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6666, v8:8350
      Reviewed-on: https://chromium-review.googlesource.com/c/1337577Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57529}
      856be9c2
    • Jakob Gruber's avatar
      [builtins] Support embedded builtins in nosnapshot builds · bf2f0a02
      Jakob Gruber authored
      This CL adds support for embedded builtins in nosnap builds by creating
      and setting an 'embedded blob' after builtin generation. Unlike
      snapshot builds, the blob is not embedded into the .text section but
      located on the C++ heap.
      
      This makes nosnap builds more consistent with mksnapshot, and allows us
      to simplify there and in serializer cctests.
      
      Complications arise from the different workflows we need to support:
      
      1. the standard mksnapshot build process,
      2. nosnap builds (which reuse the blob created by the first Isolate),
      2. and tests with various complicated serialization workflows.
      
      To cover all of these cases, this CL introduces two knobs to twiddle:
      
      1. A 'sticky' embedded blob which overrides compiled-in default
         embedded blobs at Isolate setup.
      2. The blob lifecycle can be managed manually or through refcounting.
      
      These are described in more detail in isolate.cc.
      
      Tbr: ulan@chromium.org
      Bug: v8:6666, v8:8350
      Change-Id: I3842e40cdaf45d2cadd05c6eb1ec2f5e3d83568d
      Reviewed-on: https://chromium-review.googlesource.com/c/1310195Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57523}
      bf2f0a02
  2. 06 Nov, 2018 1 commit
  3. 18 Sep, 2018 2 commits
  4. 09 Aug, 2018 1 commit
    • Alexey Kozyatinskiy's avatar
      [inspector] added V8InspectorClient::resourceNameToUrl · dbfcc487
      Alexey Kozyatinskiy authored
      Some clients (see Node.js) use platform path as ScriptOrigin.
      Reporting platform path in protocol makes using protocol much harder.
      This CL introduced V8InspectorClient::resourceNameToUrl method that
      is called for any reported using protocol url.
      V8Inspector uses url internally as well so protocol client may generate
      pattern for blackboxing with file urls only and does not need to build
      complicated regexp that covers files urls and platform paths on
      different platforms.
      
      R=lushnikov@chromium.org
      TBR=yangguo@chromium.org
      
      Bug: none
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Iff302e7441df922fa5d689fe510f5a9bfd470b9b
      Reviewed-on: https://chromium-review.googlesource.com/1164624
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55029}
      dbfcc487
  5. 31 Jul, 2018 1 commit
    • Sigurd Schneider's avatar
      [utils] Change ReadFile interface · ec067322
      Sigurd Schneider authored
      ReadFile returned a Vector with ownership transfer, i.e. the client
      needed to call Dispose to free the memory. This CL changes the interface
      to return a std::string instead, which manages ownership. As it turns
      out, there is only one user of ReadString that sometimes calls an API
      function which expects to take ownership of its Vector argument.
      
      Bug: v8:7932
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ie624a7a65cf5814fddce7a57bc557e4b9876bc53
      Reviewed-on: https://chromium-review.googlesource.com/1155115
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54805}
      ec067322
  6. 23 Jul, 2018 1 commit
  7. 20 Jul, 2018 1 commit
  8. 08 May, 2018 1 commit
  9. 19 Apr, 2018 1 commit
  10. 16 Feb, 2018 1 commit
  11. 14 Dec, 2017 1 commit
  12. 22 Nov, 2017 3 commits
    • Alexey Kozyatinskiy's avatar
      Reland [inspector] introduced stackTraceId and externalAsyncTask API · 885a5669
      Alexey Kozyatinskiy authored
      Sometimes we need to capture stack trace on one debugger and use it
      later as a parent stack on another debugger (e.g. worker.postMessage).
      
      This CL includes following addition to our protocol and v8-inspector.h:
        - added Runtime.StackTraceId, this id represents stack trace captured
          on debugger with given id,
        - protocol client can fetch Runtime.StackTrace by
          Runtime.StacKTraceId using Debugger.getStackTrace method,
        - externalParent field is added to Debugger.paused event, it may
          contain external parent stack trace,
        - V8Inspector::storeCurrentStackTrace captures current stack trace
          and returns V8StackTraceId for embedder this id can be used as
          argument for V8Inspector::externalAsyncTaskStarted and
          V8Inspector::externalAsyncTaskFinished method. Any async stack
          trace captured between these calls will get passed external stack
          trace as external parent. These methods are designed to be called
          on different debuggers. If async task is scheduled and started on
          one debugger user should continue to use asyncTask* API,
        - Debugger.enable methods returns unique debuggerId.
      
      TBR=dgozman@chromium.org,jgruber@chromium.org
      
      Bug: chromium:778796
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I2c1a2b2e30ed69ccb61d10f08686f4edb09f50e4
      Reviewed-on: https://chromium-review.googlesource.com/786274
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49591}
      885a5669
    • Clemens Hammacher's avatar
      Revert "[inspector] introduced stackTraceId and externalAsyncTask API" · 4379533c
      Clemens Hammacher authored
      This reverts commit 3a41b697.
      
      Reason for revert: Break msvc: https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/250
      
      Original change's description:
      > [inspector] introduced stackTraceId and externalAsyncTask API
      > 
      > Sometimes we need to capture stack trace on one debugger and use it
      > later as a parent stack on another debugger (e.g. worker.postMessage).
      > 
      > This CL includes following addition to our protocol and v8-inspector.h:
      >   - added Runtime.StackTraceId, this id represents stack trace captured
      >     on debugger with given id,
      >   - protocol client can fetch Runtime.StackTrace by
      >     Runtime.StacKTraceId using Debugger.getStackTrace method,
      >   - externalParent field is added to Debugger.paused event, it may
      >     contain external parent stack trace,
      >   - V8Inspector::storeCurrentStackTrace captures current stack trace
      >     and returns V8StackTraceId for embedder this id can be used as
      >     argument for V8Inspector::externalAsyncTaskStarted and
      >     V8Inspector::externalAsyncTaskFinished method. Any async stack
      >     trace captured between these calls will get passed external stack
      >     trace as external parent. These methods are designed to be called
      >     on different debuggers. If async task is scheduled and started on
      >     one debugger user should continue to use asyncTask* API,
      >   - Debugger.enable methods returns unique debuggerId.
      > 
      > Bug: chromium:778796
      > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: I16aba0d04bfcea90f3e187e635a0588c92354539
      > Reviewed-on: https://chromium-review.googlesource.com/754183
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
      > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#49582}
      
      TBR=dgozman@chromium.org,pfeldman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org,jgruber@chromium.org
      
      Change-Id: I9b52354fa0841e5148596cf594317f2e5fe508ea
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:778796
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/786152Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49584}
      4379533c
    • Alexey Kozyatinskiy's avatar
      [inspector] introduced stackTraceId and externalAsyncTask API · 3a41b697
      Alexey Kozyatinskiy authored
      Sometimes we need to capture stack trace on one debugger and use it
      later as a parent stack on another debugger (e.g. worker.postMessage).
      
      This CL includes following addition to our protocol and v8-inspector.h:
        - added Runtime.StackTraceId, this id represents stack trace captured
          on debugger with given id,
        - protocol client can fetch Runtime.StackTrace by
          Runtime.StacKTraceId using Debugger.getStackTrace method,
        - externalParent field is added to Debugger.paused event, it may
          contain external parent stack trace,
        - V8Inspector::storeCurrentStackTrace captures current stack trace
          and returns V8StackTraceId for embedder this id can be used as
          argument for V8Inspector::externalAsyncTaskStarted and
          V8Inspector::externalAsyncTaskFinished method. Any async stack
          trace captured between these calls will get passed external stack
          trace as external parent. These methods are designed to be called
          on different debuggers. If async task is scheduled and started on
          one debugger user should continue to use asyncTask* API,
        - Debugger.enable methods returns unique debuggerId.
      
      Bug: chromium:778796
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I16aba0d04bfcea90f3e187e635a0588c92354539
      Reviewed-on: https://chromium-review.googlesource.com/754183Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49582}
      3a41b697
  13. 16 Nov, 2017 1 commit
    • Andreas Haas's avatar
      [inspector] Dispose the isolate in the inspector tests · d9a91da6
      Andreas Haas authored
      At the moment the inspector tests do not dispose the isolate. This is a
      problem because the disposal of the isolate is used to stop the
      execution of background tasks. The missing disposal of the isolate
      caused flaky tests on the bots recently. With this CL the isolates of
      the inspector tests get disposed.
      
      The disposal of the isolate requires the following changes: 1) Store the
      isolate in a unique_ptr so that it gets disposed when the isolate-data
      gets disposed. It is necessary to use the unique_ptr so that the isolate
      gets disposed after other members of isolate-data get disposed.  2)
      Dispose all sessions. The reason is that the sessions require the
      isolate to exist when they get disposed because they own handles.
      Sessions, however, are stored in a static map, whereas the isolate is
      stored indirectly in a local variable of the main function. Since local
      variables get disposed before the static map is cleared, we have to
      clear the map before the end of the main function.
      
      R=kozyatinskiy@chromium.org
      
      Change-Id: Icb33184de254638b6cdfb899e940f18e6064cd69
      Reviewed-on: https://chromium-review.googlesource.com/774885Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49424}
      d9a91da6
  14. 14 Nov, 2017 1 commit
  15. 06 Nov, 2017 1 commit
    • Alexey Kozyatinskiy's avatar
      [inspector] do not call native accessor in Rumtime.getProperties · ea04c667
      Alexey Kozyatinskiy authored
      In current implementation Object.getOwnPropertyDescriptor calls native
      getter. It can produce side effects. We can avoid calling it.
      DevTools frontend will show clickable dots and on click returns value.
      This CL does not affect Blink and only affect several Node.js
      properties, e.g. process.title.
      
      R=yangguo@chromium.org
      
      Bug: v8:6945
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I5764c779ceed4d50832edf68b2b4c6ee2c2dd65c
      Reviewed-on: https://chromium-review.googlesource.com/754223
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49152}
      ea04c667
  16. 18 Oct, 2017 1 commit
  17. 28 Aug, 2017 1 commit
  18. 23 Aug, 2017 1 commit
  19. 01 Aug, 2017 1 commit
  20. 25 Jul, 2017 1 commit
    • Michael Hablich's avatar
      Revert "[inspector] support for cases when embedder doesn't call contextDestroyed" · 4f2e6e9d
      Michael Hablich authored
      This reverts commit 87aae715.
      
      Reason for revert: Speculative revert because of ASAN leaks in https://chromium-review.googlesource.com/584488
      
      Original change's description:
      > [inspector] support for cases when embedder doesn't call contextDestroyed
      > 
      > Node.js doesn't have good place to call contextDestroyed.
      > We need to cleanup everything on our side to allow clients to not call
      > contextDestroyed method.
      > 
      > R=​dgozman@chromium.org,eostroukhov@google.com
      > 
      > Bug: none
      > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: I6bfd4d6039f53eb994a2d20ecbca650744564e29
      > Reviewed-on: https://chromium-review.googlesource.com/575519
      > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
      > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46849}
      
      TBR=dgozman@chromium.org,kozyatinskiy@chromium.org,eostroukhov@google.com,eostroukhov@chromium.org
      
      Change-Id: Ic3c2764159f809536670f73ab0cd5ea37317d400
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: none
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/584767Reviewed-by: 's avatarMichael Hablich <hablich@chromium.org>
      Commit-Queue: Michael Hablich <hablich@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46865}
      4f2e6e9d
  21. 24 Jul, 2017 1 commit
  22. 05 Jun, 2017 1 commit
  23. 22 May, 2017 2 commits
  24. 18 May, 2017 1 commit
  25. 16 May, 2017 2 commits
  26. 26 Apr, 2017 1 commit
  27. 25 Apr, 2017 3 commits
  28. 21 Apr, 2017 1 commit
  29. 20 Apr, 2017 2 commits
    • kozyatinskiy's avatar
      [test/inspector] migrate utils to ObjectTemplate · f4721a5f
      kozyatinskiy authored
      v8::Extension should be replaced with ObjectTemplates. So let's not use it for utils.
      
      BUG=none
      R=dgozman@chromium.org
      
      Review-Url: https://codereview.chromium.org/2828143002
      Cr-Commit-Position: refs/heads/master@{#44754}
      f4721a5f
    • kozyatinskiy's avatar
      [inspector] removed kDebugPromiseCollected event · 189ffd94
      kozyatinskiy authored
      With recent CLs we always store maximum N async stack traces and when we reach limit we drop half of them.
      Current promise collected event requires creating weak handle:
      - it takes time,
      - it consumes memory.
      Since async task id distribution for promises is uniform (each new promise has last_async_task_id + 1 as an id) our hash map is good enough to handle any amount of async task ids, following time of executing 1 000 000 000 of lookups:
      - for empty hash map: 1.45 seconds,
      - for hash map with one entry: 14.95 seconds
      - 1024 entries: 15.03 seconds
      - 1024 * 1024 entries: 14.82 seconds
      - 1024 * 1024 * 1024: 17.9 seconds
      
      BUG=v8:6189
      R=dgozman@chromium.org,yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2819423005
      Cr-Commit-Position: refs/heads/master@{#44750}
      189ffd94
  30. 18 Apr, 2017 1 commit