1. 07 Sep, 2020 2 commits
    • Camillo Bruni's avatar
      Revert "[test][d8] Add d8.log.getAndStop helper" · 8bf237dd
      Camillo Bruni authored
      This reverts commit 95aa697b.
      
      Reason for revert: breaks under tsan
      
      Original change's description:
      > [test][d8] Add d8.log.getAndStop helper
      > 
      > The new helper function allows us to write tests for log parsing
      > without the need to first generating a log file. This makes it easier
      > to spot errors when the log format changes.
      > 
      > - Add d8 global variable
      > - Add file_name accessor to Logger and Log classes
      > - Change OS::LogFileOpenMode to w+ / wb+
      > - Use separate Log::WriteLogHeader method
      > - Remove unused logger_ instance variable from Log
      > 
      > Bug: v8:10644
      > Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
      > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69715}
      
      TBR=mlippautz@chromium.org,cbruni@chromium.org,gsathya@chromium.org,verwaest@chromium.org
      
      Change-Id: Iad47d2f1e3391cae3c2f8c9e6c904c43925e1671
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10644
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396080Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69717}
      8bf237dd
    • Camillo Bruni's avatar
      [test][d8] Add d8.log.getAndStop helper · 95aa697b
      Camillo Bruni authored
      The new helper function allows us to write tests for log parsing
      without the need to first generating a log file. This makes it easier
      to spot errors when the log format changes.
      
      - Add d8 global variable
      - Add file_name accessor to Logger and Log classes
      - Change OS::LogFileOpenMode to w+ / wb+
      - Use separate Log::WriteLogHeader method
      - Remove unused logger_ instance variable from Log
      
      Bug: v8:10644
      Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69715}
      95aa697b
  2. 03 Sep, 2020 8 commits
  3. 02 Sep, 2020 9 commits
  4. 01 Sep, 2020 10 commits
    • Arno Renevier's avatar
      [builtins] Use fast path for JSArray source in TypedArray.from() · d022b74c
      Arno Renevier authored
      For TypedArray, a fast path is used when using the builtin iterator, and
      next method has not been overriden. If we use that fast path for JSArray
      too, the method will be about 200x times faster on a large array.
      
      This patch also fixes a bug when a typed array is modified during the
      mapper execution. In that case, the modification should not be taken
      into account.
      
      Bug: v8:10802
      
      Change-Id: I74e2cbcd6a654def318585b4e08745037584669a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2358749
      Commit-Queue: Arnaud Renevier <arenevier@fb.com>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69655}
      d022b74c
    • Michael Lippautz's avatar
      cppgc: Fix GCInvoker task handle · aa4b47b9
      Michael Lippautz authored
      The handle was always created empty which resulted in a DCHECK crash
      in debug builds and in never-cancelled tasks in release builds.
      
      Bug: chromium:1056170
      Change-Id: I798ce65c37738bbe9c60b44b692ff04536f6d830
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2388101Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69653}
      aa4b47b9
    • Ng Zhi An's avatar
      [wasm-simd] Add some more NaNs to test array · c771a480
      Ng Zhi An authored
      There were some +/- infs hidden in that list of NaNs (and those were
      repeated too). Add a NaN with top bit of payload unset. This will help
      catch cases where we did not canonicalize results properly.
      
      Bug: v8:10862
      Change-Id: I05e3e0b2351430abf3eaa859a0d828f43b44cfb6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2386483Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69651}
      c771a480
    • Gus Caplan's avatar
      [api] add reflection apis for v8::Data · d4d0cf32
      Gus Caplan authored
      Allows reflection of v8::Data types, such as being able to check if a
      value is a v8::Module. This is useful for libraries which wrap the V8
      API, such as rusty_v8.
      
      Change-Id: I4841c5f7f60885b20e1504c8562e278844ff7ec3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2382719Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Gus Caplan <snek@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69649}
      d4d0cf32
    • Andreas Haas's avatar
      [test] Enable --wasm-tier-up when test does serialization · 10e2311f
      Andreas Haas authored
      With a recent change, we require WebAssembly code to be tiered up to
      serialize it, see https://crrev.com/c/2349290. In that CL tests were
      adjusted to set the --wasm-tier-up flag when serialization was involved.
      However, the test adjusted in this CL was missing, because this test
      used the kExprRefNull instruction, which caused a bailout to TurboFan
      anyways. With recent changes, Liftoff can compile kExprRefNull now,
      and therefore causes problems.
      
      R=thibaudm@chromium.org
      
      Bug: v8:10852
      Change-Id: I9b89f37c22f17cbf046110f3ee1c98bfea73e009
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387574Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69648}
      10e2311f
    • Peter Marshall's avatar
      [cpu-profiler] Add stats to track missing or unnattributed frames · ca6675ed
      Peter Marshall authored
      This adds a global counter for the various reasons we might fail to
      attribute a tick.
      
      The counters are cleared and printed when Profile::Print() is called,
      which we call in our tests, so flaky test output will now contain these
      stats along with the printed profile tree.
      
      Drive-by cleanup some print functions and make them const.
      
      Change-Id: Ia3a27405f5b5346adfdbb32afc7e414857969cc5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550406
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69647}
      ca6675ed
    • evih's avatar
      [wasm] Use generic js-to-wasm wrapper for n int32 param case · 42fcb2c2
      evih authored
      The generic wrapper can be used for Wasm functions with int32 parameters
      and no return values.
      
      Changed the GC scanning for the generic wrapper.
      
      Added tests for cases when all the parameters of the Wasm function fit
      into registers and when some of the parameters are on the top of the
      stack.
      
      Change-Id: I511fd04d2a4a2bdc4a6f72d72e2867a03b256f6f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2381459Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Eva Herencsárová <evih@google.com>
      Cr-Commit-Position: refs/heads/master@{#69645}
      42fcb2c2
    • Andreas Haas's avatar
      [wasm][fuzzer] Enable trap handlers only once · 024f2c4b
      Andreas Haas authored
      The fuzzer function is called multiple times with libfuzzer. Trap
      handlers, however, should only be initialized once. With this CL we add
      a flag to initialize trap handlers only once.
      
      R=clemensb@chromium.org
      
      Bug: chromium:1122590
      Change-Id: Ib51a50cfe9dad5e3133de3085ad147f5a069b1bd
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2384769
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69643}
      024f2c4b
    • Peter Marshall's avatar
      Revert "[cpu-profiler] Ensure sampled thread has Isolate lock under Windows" · 32435062
      Peter Marshall authored
      This reverts commit dfb3f7da.
      
      Reason for revert: Breaks LSAN & ASAN flakily: https://bugs.chromium.org/p/v8/issues/detail?id=10861
      
      Original change's description:
      > [cpu-profiler] Ensure sampled thread has Isolate lock under Windows
      > 
      > While the sampler checked if the sampled thread had the Isolate locked
      > (if locks are being used) under Linux, the check was not done under
      > Windows (or Fuchsia) which meant that in a multi-threading application
      > under Windows, thread locking was not checked making it prone to seg
      > faults and the like as the profiler would be extracting info from a
      > heap in motion. The fix was to move the lock check into CpuSampler
      > and Ticker (--prof) so all OSes would do the correct check.
      > 
      > The basic concept is that on all operating systems a CpuProfiler, and
      > so its corresponding CpuCampler, the profiler is tied to a thread.
      > This is not based on first principles or anything, it's simply the
      > way it works in V8, though it is a useful conceit as it makes
      > visualization and interpretation of profile data much easier.
      > 
      > To collect a sample on a thread associated with a profiler the thread
      > must be stopped for obvious reasons -- walking the stack of a running
      > thread is a formula for disaster. The mechanism for stopping a thread
      > is OS-specific and is done in sample.cc. There are currently three
      > basic approaches, one for Linux/Unix variants, one for Windows and one
      > for Fuchsia. The approaches vary as to which thread actually collects
      > the sample -- under Linux the sample is actually collected on the
      > (interrupted) sampled thread whereas under Fuchsia/Windows it's on
      > a separate thread.
      > 
      > However, in a multi-threaded environment (where Locker is used), it's
      > not sufficient for the sampled thread to be stopped. Because the stack
      > walk involves looking in the Isolate heap, no other thread can be
      > messing with the heap while the sample is collected. The only ways to
      > ensure this would be to either stop all threads whenever collecting a
      > sample, or to ensure that the thread being sampled holds the Isolate
      > lock so prevents other threads from messing with the heap. While there
      > might be something to be said for the "stop all threads" approach, the
      > current approach in V8 is to only stop the sampled thread so, if in a
      > multi-threaded environment, the profiler must check if the thread being
      > sampled holds the Isolate lock.
      > 
      > Since this check must be done, independent of which thread the sample
      > is being collected on (since it varies from OS to OS), the approach is
      > to save the thread id of the thread to be profiled/sampled when the
      > CpuSampler is instantiated (on all OSes it is instantiated on the
      > sampled thread) and then check that thread id against the Isolate lock
      > holder thread id before collecting a sample. If it matches, we know
      > sample.cc has stop the sampled thread, one way or another, and we know
      > that no other thread can mess with the heap (since the stopped thread
      > holds the Isolate lock) so it's safe to walk the stack and collect data
      > from the heap so the sample can be taken. It it doesn't match, we can't
      > safely collect the sample so we don't.
      > 
      > Bug: v8:10850
      > Change-Id: Iab2493130b9328430d7e5f5d3cf90ad6d10b1892
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2377108
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69623}
      
      TBR=akodat@rocketsoftware.com,petermarshall@chromium.org,petermarshall@google.com
      
      Change-Id: Ib6b6dc4ce109d5aa4e504fa7c9769f5cd95ddd0c
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10850
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387570Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69638}
      32435062
    • Santiago Aboy Solanes's avatar
      [unwinder] Clean up existing tests · 5d471ee6
      Santiago Aboy Solanes authored
      Mostly a cleanup for x64.
      
      Also enable two tests for Arm and Arm64 since they do not make use of
      JSEntry frames.
      
      Bug: v8:10833
      Change-Id: Id6adadf582bdca0076460842ffe4ec856ca99393
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2381455
      Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69634}
      5d471ee6
  5. 31 Aug, 2020 11 commits