1. 28 Sep, 2018 1 commit
  2. 20 Sep, 2018 1 commit
  3. 13 Sep, 2018 1 commit
  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. 23 Jul, 2018 1 commit
  6. 10 Jul, 2018 1 commit
  7. 18 Jun, 2018 1 commit
  8. 05 Jun, 2018 1 commit
  9. 03 Jun, 2018 1 commit
  10. 31 May, 2018 2 commits
  11. 30 May, 2018 3 commits
    • Alexey Kozyatinskiy's avatar
      [inspector] speedup async instrumentation · c0023946
      Alexey Kozyatinskiy authored
      We use name of the function at the moment of first appearance of given
      function in stack trace. Any further name changes would be ignored.
      It gives us around 20% speedup.
      
      Perf analysis: https://bit.ly/2wp99vt
      
      R=yangguo@chromium.org,jgruber@chromium.org
      
      Bug: v8:7078
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: I9f21f0bd9cd923e5abaeffb9209df0be2f49afff
      Reviewed-on: https://chromium-review.googlesource.com/1050984
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53446}
      c0023946
    • Alexey Kozyatinskiy's avatar
      [inspector] reworked async stack instrumentation for async functions · b6c9086c
      Alexey Kozyatinskiy authored
      New intstrumentation consists of:
      - kAsyncFunctionSuspended when async function is suspended on await
        (called on each await),
      - kAsyncFunctionFinished when async function is finished.
      
      Old instrumentation was based on reusing async function promise.
      Using this promise produces couple side effects:
      - for any promise instrumentation we first need to check if it is
        special case for async function promise or not - it requires
        expensive reading from promise object.
      - we capture stack for async functions even if it does not contain
        awaits.
      - we do not properly cancel async task created for async function.
      
      New intsrumntation resolved all these problems as well as provide
      clear mapping between async task and generator which we can use later
      to fetch scope information for async functions on pause.
      
      R=dgozman@chromium.org,yangguo@chromium.org
      
      Bug: v8:7078
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ifdcec947d91e6e3d4d5f9029bc080a19b8e23d41
      Reviewed-on: https://chromium-review.googlesource.com/1043096Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53445}
      b6c9086c
    • Alexey Kozyatinskiy's avatar
      [inspector] use interrupt for pause only as last resort · 6d87d957
      Alexey Kozyatinskiy authored
      With this CL we use interrupt for pause in two cases:
      - when we process Debugger.pause on interruption,
      - when we would like to break as soon as possible after OOM.
      In all other cases, e.g. for async step into we use break
      on function call by calling StepIn debugger action.
      
      In mentioned cases we should not actually use interrupt as well:
      - Debugger.pause in this case scheduled using interrupt and we
        may just break right now without requesting another interrupt,
        unfortunately blink side is not ready,
      - we should use more reliable way to break right after near OOM
        callback, otherwise we can get this callback, increase limit,
        request break on next interrupt, before interrupt get another
        huge memory allocation and crash.
      
      There are couple advantages:
      - we get much better break locations for async stepping
        (see inspector tests expectations),
      - we can remove DEBUG_BREAK interruption
        (it should speedup blackboxing with async tasks, see
        removed todo in debug.cc for details)
      - it is required preparation step for async step out,
        (see https://chromium-review.googlesource.com/c/v8/v8/+/1054618)
      
      Bug: v8:7753
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Iabd7627dbffa9a0eab1736064caf589d02591926
      Reviewed-on: https://chromium-review.googlesource.com/1054155
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53439}
      6d87d957
  12. 17 May, 2018 1 commit
  13. 03 May, 2018 1 commit
  14. 25 Apr, 2018 1 commit
  15. 14 Apr, 2018 1 commit
  16. 13 Apr, 2018 2 commits
  17. 27 Mar, 2018 1 commit
    • Ulan Degenbaev's avatar
      [heap,api] Introduce near-heap-limit callbacks. · 84a80e10
      Ulan Degenbaev authored
      The embedder can get notification when V8 heap size approaches the heap limit
      and can extend the heap limit if needed using
      - v8::Isolate::AddNearHeapLimitCallback
      - v8::Isolate::RemoveNearHeapLimitCallback
      
      This generalizes the exiting v8::debug::SetOutOfMemoryCallback API.
      
      Bug: chromium:824214
      
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ia444cb7efb6fe85c57fa3785e8fd1d8b654a5224
      Reviewed-on: https://chromium-review.googlesource.com/979447
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52238}
      84a80e10
  18. 19 Mar, 2018 1 commit
    • Alexey Kozyatinskiy's avatar
      Reland "[inspector] added Runtime.terminateExecution" · 97fc20f3
      Alexey Kozyatinskiy authored
      This is a reland of 14824520
      
      Original change's description:
      > [inspector] added Runtime.terminateExecution
      >
      > Runtime.terminateExecution terminates current or next JavaScript
      > call. Termination flag is automatically reset as soon as v8 call
      > or microtasks are completed.
      >
      > R=pfeldman@chromium.org
      >
      > Bug: chromium:820640
      > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      > Change-Id: Ie21c123be3a61fe25cf6e04c38a8b6c664622ed7
      > Reviewed-on: https://chromium-review.googlesource.com/957386
      > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#51912}
      
      Bug: chromium:820640
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: I6dd30f65c06c2b7eefd1e7beb9a3cf50ea5bf8cd
      Reviewed-on: https://chromium-review.googlesource.com/967323
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52004}
      97fc20f3
  19. 17 Mar, 2018 2 commits
    • Michael Achenbach's avatar
      Revert "Reland "[inspector] added Runtime.terminateExecution"" · 7652bd27
      Michael Achenbach authored
      This reverts commit 14824520.
      
      Reason for revert: Breaks chromium tsan in roll:
      https://chromium-review.googlesource.com/c/chromium/src/+/967682
      
      Original change's description:
      > Reland "[inspector] added Runtime.terminateExecution"
      > 
      > This is a reland of 98dec8f2
      > 
      > Original change's description:
      > > [inspector] added Runtime.terminateExecution
      > > 
      > > Runtime.terminateExecution terminates current or next JavaScript
      > > call. Termination flag is automatically reset as soon as v8 call
      > > or microtasks are completed.
      > > 
      > > R=pfeldman@chromium.org
      > > 
      > > Bug: chromium:820640
      > > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      > > Change-Id: Ie21c123be3a61fe25cf6e04c38a8b6c664622ed7
      > > Reviewed-on: https://chromium-review.googlesource.com/957386
      > > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#51912}
      > 
      > Bug: chromium:820640
      > Change-Id: I8f270c2fdbe732f0c40bfb149d26a6e73d988253
      > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      > Reviewed-on: https://chromium-review.googlesource.com/966681
      > Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52002}
      
      TBR=dgozman@chromium.org,pfeldman@chromium.org,kozyatinskiy@chromium.org
      
      Change-Id: I2f3d24b238f479082bfed349363240887b5ba751
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:820640
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      Reviewed-on: https://chromium-review.googlesource.com/967781Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52003}
      7652bd27
    • Alexey Kozyatinskiy's avatar
      Reland "[inspector] added Runtime.terminateExecution" · 14824520
      Alexey Kozyatinskiy authored
      This is a reland of 98dec8f2
      
      Original change's description:
      > [inspector] added Runtime.terminateExecution
      > 
      > Runtime.terminateExecution terminates current or next JavaScript
      > call. Termination flag is automatically reset as soon as v8 call
      > or microtasks are completed.
      > 
      > R=pfeldman@chromium.org
      > 
      > Bug: chromium:820640
      > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      > Change-Id: Ie21c123be3a61fe25cf6e04c38a8b6c664622ed7
      > Reviewed-on: https://chromium-review.googlesource.com/957386
      > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#51912}
      
      Bug: chromium:820640
      Change-Id: I8f270c2fdbe732f0c40bfb149d26a6e73d988253
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      Reviewed-on: https://chromium-review.googlesource.com/966681Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52002}
      14824520
  20. 14 Mar, 2018 1 commit
  21. 13 Mar, 2018 1 commit
  22. 26 Feb, 2018 1 commit
  23. 18 Dec, 2017 1 commit
  24. 29 Nov, 2017 1 commit
  25. 23 Nov, 2017 2 commits
  26. 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
  27. 21 Nov, 2017 1 commit
    • Alexey Kozyatinskiy's avatar
      [inspector] reworked async instrumentation for promises · ed9b2072
      Alexey Kozyatinskiy authored
      Old instrumentation was designed to collect promise creation stack and
      promise scheduled stack together. In DevTools for last 6 months we
      show only creation stack for promises. We got strong support from users
      for new model. Now we can drop support for scheduled stacks and
      simplify implementation.
      
      New promise instrumentation is straightforward:
      - we send kDebugPromiseThen when promise is created by .then call,
      - we send kDebugPromiseCatch when promise is created by .catch call,
      - we send kDebugWillHandle before chained callback and kDebugDidHandle
        after chained callback,
      - and we send separate kDebugAsyncFunctionPromiseCreated for internal
        promise inside async await function.
      
      Advantages:
      - we reduce amount of captured stacks (we do not capture stack for
        promise that constructed not by .then or .catch),
      - we can consider async task related to .then and .catch as one shot
        since chained callback is executed once,
      - on V8 side we can implement required instrumentation using only
        promise hooks,
      
      Disadvantage:
      - see await-promise test, sometimes scheduled stack was useful since we
        add catch handler in native code,
      
      Implementation details:
      - on kInit promise hook we need to figure out why promise was created.
        We analyze builtin functions until first user defined function on
        current stack. If there is kAsyncFunctionPromiseCreate function then
        we send kDebugAsyncFunctionPromiseCreated event. If there is
        kPromiseThen or kPromiseCatch then only if this function is bottom
        builtin function we send corresponded event to inspector. We need it
        because Promise.all internally calls .then and in this case we have
        Promise.all and Promise.then on stack at the same time and we do not
        need to report this internally created promise to inspector.
      
      Bug: chromium:778796
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: I53f47ce8c5c4a9897655c3396c249ea59529ae47
      Reviewed-on: https://chromium-review.googlesource.com/765208
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49553}
      ed9b2072
  28. 20 Nov, 2017 1 commit
  29. 06 Nov, 2017 1 commit
    • Alexey Kozyatinskiy's avatar
      [inspector] added new way to step into async task · 079c0fd8
      Alexey Kozyatinskiy authored
      It is preparation step for step-into-worker. There are few changes:
      - added breakOnAsyncCall flag for Debugger.stepInto. When flag is set
        and async task is scheduled before step-into finished, we pause
        execution with additional Debugger.paused event. This event contains
        additional scheduledAsyncTaskId field.
      - added Debugger.pauseOnAsyncTask. This method will pause execution as
        soon as given async task is started.
      
      This mechanism is replacement for Debugger.scheduleStepIntoAsync which
      can not be used between multiple targets.
      
      As result we can split async task scheduling in one target and
      requesting break for this async task running in another target.
      
      R=pfeldman@chromium.org
      
      Bug: chromium:778796
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: I77be0c880d91253d333c54a23a4c084e7b8549e9
      Reviewed-on: https://chromium-review.googlesource.com/750071Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarPavel Feldman <pfeldman@chromium.org>
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49127}
      079c0fd8
  30. 18 Oct, 2017 1 commit
  31. 06 Oct, 2017 1 commit
  32. 12 Sep, 2017 1 commit