1. 07 Jan, 2021 23 commits
  2. 06 Jan, 2021 12 commits
  3. 05 Jan, 2021 5 commits
    • Sara Tang's avatar
      Step 1 (of 3-ish): Basic ETW Instrumentation in V8 · 8b33c872
      Sara Tang authored
      Design doc:
      https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
      A lot has changed since the last patchset! I recommend revisiting this
      design doc and reading the parts in green. I explain the roadmap for
      what changes to expect from ETW instrumentation as well as the
      instrumentation of this particular CL.
      
      I'll do my best to answer any further questions anyone has about my
      particular instrumentation or ETW in general :)
      
      ---
      
      This is the first of a series of changelists to round out ETW
      instrumentation for V8.
      
      This changelist represents the most minimal change needed to instrument
      ETW in V8. In particular, it:
        - defines and registers the ETW provider,
        - interacts minimally with the rest of V8, by hooking into the
          existing TracingController::AddTraceEvent function,
        - is designed with a platform-agnostic layer, so that event tracers
          for other platforms can be instrumented in teh future.
      
      Some notes on instrumentation (aka I copied stuff from the design doc):
      
      We make heavy use of the TraceLogging API to log events. It differs from
      previous methods of emitting ETW events in that it doesn<E2><80><99>t
      require the overhead of a separate manifest file to keep track of
      metadata; rather, events using this API are self-descriptive.
      
      Here are the five major steps to instrument the TraceLogging API:
        - Forward declare the provider (from provider-win.h)
        - Define the provider in a .cc file (from provider-win.cc)
        - Register the provider (called from v8.cc).
        - Write events (called from libplatform/tracing-controller.cc)
        - Unregister the provider (called from v8.cc)
      
      At the base, we have an abstract provider class that encapsulates the
      functionality of an event provider. These are things like registering
      and unregistering the provider, and the actual event-logging.
      
      The provider class is split into provider-win and provider-mac
      (currently not instantiated) classes, with OS-dependent implementations
      of the above functions.
      
      In particular, the TraceLogging API is used only in provider-win. It is
      here that we forward declare and define the provider, as well as write
      ETW events.
      
      Finally, there is a v8-provider class that serves as a top-level API and
      is exposed to the rest of V8. It acts as a wrapper for the
      platform-specific providers.
      
      The .wprp file is needed so that Windows Performance Recorder knows how
      to capture our events.
      
      Some considerations:
        - Is TracingController::AddTraceEvent the best place from which to
          write my events?
        - Is src/libplatform/tracing the best place to put my instrumentation?
        - Right now, I fail the preupload because of this, which tells me my
          files are probably not in the best location:
      
      You added one or more #includes that violate checkdeps rules.
      src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
      Because of "-src/libplatform" from src's include_rules.
      
      Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
      Bug: v8:11043
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Commit-Queue: Sara Tang <sartang@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#71918}
      8b33c872
    • Andreas Haas's avatar
      [wasm] Remove negative implication from --single-threaded to --liftoff · 3345472f
      Andreas Haas authored
      The negative implication from --single-threaded to --liftoff was
      introduced because with --single-threaded, no tier-up to TurboFan is
      possible, and TurboFan provides faster code and smaller code
      
      This CL removes this implication. The reason is that this implication
      does not only define the default compiler for --single-threaded to
      TurboFan, and also completely disables the option to use Liftoff
      instead. By removing the implication, and embedder who uses
      --single-threaded can decide by themselves if they want to use Liftoff
      by setting --liftoff, or if they don't want to use Liftoff by setting
      --no-liftoff.
      
      R=clemensb@chromium.org
      
      Bug: v8:11279
      Change-Id: Ie6e64a42823b87484135364ecb4589cfd188db5e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2599548Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71917}
      3345472f
    • Clemens Backes's avatar
      Revert "[wasm-simd][liftoff][x64] Move v128.select into macro-assembler" · b48824ff
      Clemens Backes authored
      This reverts commit 2d5f981a.
      
      Reason for revert: Fails on noavx: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20debug/35318
      
      Original change's description:
      > [wasm-simd][liftoff][x64] Move v128.select into macro-assembler
      >
      > This allows us to reuse this optimized code sequence in Liftoff.
      >
      > We can't do the same thing in IA32 yet, there is no kScratchDoubleReg
      > defined in the macro-assembler-ia32.cc, it is defined in code-generator-ia32
      > as xmm0 but I'm not sure if it is safe to just use that in the macro assembler.
      >
      > Change-Id: I6c761857c49d2518fbc82cd0796c62fc86665cb5
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2596581
      > Commit-Queue: Zhi An Ng <zhin@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71915}
      
      TBR=bbudge@chromium.org,clemensb@chromium.org,zhin@chromium.org
      
      Change-Id: I2aacee02c89a16516a9cd6686d8cc6180362f78e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2610730Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71916}
      b48824ff
    • Zhi An Ng's avatar
      [wasm-simd][liftoff][x64] Move v128.select into macro-assembler · 2d5f981a
      Zhi An Ng authored
      This allows us to reuse this optimized code sequence in Liftoff.
      
      We can't do the same thing in IA32 yet, there is no kScratchDoubleReg
      defined in the macro-assembler-ia32.cc, it is defined in code-generator-ia32
      as xmm0 but I'm not sure if it is safe to just use that in the macro assembler.
      
      Change-Id: I6c761857c49d2518fbc82cd0796c62fc86665cb5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2596581
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71915}
      2d5f981a
    • Clemens Backes's avatar
      [logging] Fix expected death message in official builds · bdcdbd4b
      Clemens Backes authored
      The tests were failing in official release builds, because those drop
      the fatal error message and always print "ignored" instead.
      
      R=ecmziegler@chromium.org
      
      Bug: v8:11251
      Change-Id: I40512ca308337cf070ecb6a206dc4a5323d67415
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2595445Reviewed-by: 's avatarEmanuel Ziegler <ecmziegler@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71914}
      bdcdbd4b