1. 10 Jan, 2022 1 commit
    • Benedikt Meurer's avatar
      [inspector] Capture stack trace only once for JSError objects. · 765ca6a0
      Benedikt Meurer authored
      When creating a new JSError object (or using the non-standard API
      `Error.captureStackTrace`) V8 would previously capture the "simple stack
      trace" (as FixedArray of CallSiteInfo instances) to be used for the non-
      standard `error.stack` property, and if the inspector was active also
      capture the "detailed stack trace" (as FixedArray of StackFrameInfo
      instances). This turns out to be quite a lot of overhead, both in terms
      of execution time as well as memory pressure, especially since the
      information needed for the inspector is a proper subset of the
      information needed by `error.stack`.
      
      So this CL addresses the above issue by capturing only the "simple stack
      trace" (in the common case) and computing the "detailed stack trace"
      from the "simple stack trace" when on demand. This is accomplished by
      introducing a new ErrorStackData container that is used to store the
      stack trace information on JSErrors when the inspector is active. When
      capturing stack trace for a JSError object while the inspector is
      active, we take the maximum of the program controlled stack trace limit
      and the inspector requested stack trace limit, and memorize the program
      controlled stack trace limit for later formatting (to ensure that the
      presence of the inspector is not observable by the program).
      
      On the `standalone.js` benchmark from crbug.com/1283162 (with the
      default max call stack size of 200) we reduce execution time by around
      16% compared to ToT. And compared to V8 9.9.4 (the version prior to the
      regression in crbug.com/1280831), we are 6% faster now.
      
      Doc: https://bit.ly/v8-cheaper-inspector-stack-traces
      Bug: chromium:1280831, chromium:1278650, chromium:1258599
      Bug: chromium:1280803, chromium:1280832, chromium:1280818
      Fixed: chromium:1283162
      Change-Id: I57dac73e0ecf7d50ea57c3eb4981067deb28133e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3366660Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78542}
      765ca6a0
  2. 08 Apr, 2021 1 commit
  3. 20 Apr, 2020 1 commit
  4. 16 Apr, 2020 1 commit
  5. 22 Jan, 2020 2 commits
  6. 16 Jan, 2020 1 commit
  7. 08 Jul, 2019 1 commit
  8. 23 May, 2019 1 commit
  9. 22 May, 2019 1 commit
  10. 20 May, 2019 2 commits
  11. 17 May, 2019 2 commits
  12. 09 Feb, 2019 1 commit
  13. 26 Dec, 2018 1 commit
  14. 11 Oct, 2018 1 commit
  15. 03 Aug, 2018 1 commit
  16. 31 Jul, 2018 1 commit
  17. 03 Jul, 2018 1 commit
  18. 02 May, 2018 1 commit
  19. 03 Nov, 2017 1 commit
  20. 27 Oct, 2017 1 commit
  21. 26 Oct, 2017 1 commit
    • Igor Sheludko's avatar
      [cleanup] Prepare V8-internal AccessorInfo objects for sharing. · b4fdce5a
      Igor Sheludko authored
      Rename |property_attributes| to |initial_property_attributes| and ensure
      that it is used as a storage of values only for AccessorInfos installed in
      API Templates (i.e. ObjectTemplate and FunctionTemplate).
      When an AccessorInfo is installed directly into an existing JS object
      (via JSObject::SetAccessor) or into a DescriptorArray (when certain V8
      objects' shapes are configured) it is not necessary to thread attributes
      being set through the AccessorInfo instance.
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Ibe61026f08c42549756f694129a286635ffe5769
      Reviewed-on: https://chromium-review.googlesource.com/730425
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48978}
      b4fdce5a
  22. 18 Jul, 2017 1 commit
  23. 10 Jul, 2017 1 commit
  24. 13 Feb, 2017 1 commit
  25. 26 Oct, 2016 1 commit
  26. 14 Oct, 2016 1 commit
  27. 02 Sep, 2016 1 commit
  28. 09 Aug, 2016 1 commit
  29. 03 Aug, 2016 2 commits
  30. 01 Aug, 2016 1 commit
  31. 29 Jul, 2016 1 commit
    • jgruber's avatar
      Set Error.stack property writable · 1c7c0521
      jgruber authored
      Previously, the stack property was set up in JS as read-only; but since
      it had a JS setter, writability was ignored and writing to stack was
      possible.
      
      This is no longer the case now that stack is either an actual data
      property, or is associated with C++ accessors. Explicitly set the
      property as writable to preserve old behavior.
      
      BUG=5245
      R=yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2190313002
      Cr-Commit-Position: refs/heads/master@{#38158}
      1c7c0521
  32. 28 Jul, 2016 1 commit
  33. 25 Jul, 2016 1 commit
  34. 22 Jul, 2016 1 commit
  35. 21 Jul, 2016 2 commits