- 06 Aug, 2020 1 commit
-
-
Clemens Backes authored
Wasm recently switched from spawning a number of background tasks for compilation to just using a single job (via the pretty new {Platform::PostJob} API). This caused major regressions in several benchmarks running in d8, because the {DefaultPlatform} is only using half of the available worker threads for executing jobs with "user visible" priority. This CL changes this to use all available worker threads for "user blocking" or "user visible" jobs, and two threads for "best effort" jobs. The limit of two threads for best effort is identical to what chromium does with best effort *tasks*. For user blocking and user visible, chromium does not impose any limit, so we also remove the limitation to half of the threads from d8. Drive-by: Use {NewDefaultJobHandle} for constructing {DefaultJobHandle}. R=mlippautz@chromium.org CC=ahaas@chromium.org, gab@chromium.org, etiennep@chromium.org Bug: chromium:1113234, chromium:1101340 Change-Id: I9280e649a1cf3832c562ff7251e8bda0103af111 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339481Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Commit-Queue: Hannes Payer <hpayer@chromium.org> Auto-Submit: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#69265}
-
- 20 Jul, 2020 1 commit
-
-
Clemens Backes authored
This will allow embedders to actually instantiate the {DefaultJobHandle} as suggested in the comment. Node currently implements {PostJob()} by just returning a nullptr. After this change, it can use the new {NewDefaultJobHandle} function and we can actually start using this API in v8. R=adamk@chromium.org Bug: v8:10723 Change-Id: I4b31a640d0edc7e7207d1df95e683465dfaaaeff Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304812Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68934}
-
- 25 Jun, 2020 1 commit
-
-
Marja Hölttä authored
Design doc: https://docs.google.com/document/d/1BU-Zyco8YPP2Ra0Y3eVZ_BllzpUkJaJhmVmmnGD44Yc/edit#heading=h.mmdxlkic7kqd Bug: v8:10239 Change-Id: Ie1b953c8242e32a0447440aaae7c2ed377c97511 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259933 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/master@{#68540}
-
- 04 Jun, 2020 1 commit
-
-
Ng Zhi An authored
Making them private was a way to hide the functions, we can explicitly delete them, which give a better compilation error message as well. Also see: https://stackoverflow.com/q/55205874 Bug: v8:10488 Change-Id: I24f70dc1f6fb227185b6f8ecb30a81e218dd2a50 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223232Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#68186}
-
- 08 May, 2020 1 commit
-
-
Daniel Bevenius authored
It looks like the usages of these were removed in Commit 8a1bafaf ("Reland "[platform] Implement TaskRunners in the DefaultPlatform"). Change-Id: I61865548020b6dc0ee7d658080ad148c7ffd6e42 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2187500Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#67680}
-
- 06 May, 2020 1 commit
-
-
Clemens Backes authored
The number of worker threads in the default platform is currently capped at 8. At runtime, it's also capped by the number of actual cores available. Since d8 is often used for benchmarking (both internally and externally), this CL slightly increases the maximum to 16. At least wasm compilation is known to scale beyond 8 threads. If this increase does not cause any problems on bots, we might increase further in the future. R=mlippautz@chromium.org Change-Id: I04e138c51d7dc26c38b9384c8ea67a883c976050 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2182454 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#67586}
-
- 05 May, 2020 1 commit
-
-
Clemens Backes authored
This function is always called right after creating the DefaultPlatform, hence merge it into the constructor. R=mlippautz@chromium.org Change-Id: I4afb14c83740224056157665db6b854c659da0c1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2182635Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#67573}
-
- 24 Apr, 2020 1 commit
-
-
Etienne Pierre-doray authored
The impl works by posting up to NumberOfWorkerThreads() tasks with CallOnWorkerThread(). Change-Id: I188ac57c9e5d6e3befdcc6f945fbf337dabe1d1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2130886 Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#67368}
-
- 17 Apr, 2020 1 commit
-
-
Sami Kyostila authored
This patch replaces V8's tracing implementation (i.e., the TRACE_EVENT macros) with the track event base implementation from Perfetto. The advantages of doing this are: 1) This allows us to remove most tracing-related backend code from V8. 2) V8 can start writing strongly typed trace event arguments, which are more compact, easier to process and more extensible than legacy JSON-based trace arguments. For the time being, we still support the old trace macros when V8 is embedded into Chrome and other embedders. Design doc: https://docs.google.com/document/d/1f7tt4cb-JcA5bQFR1oXk60ncJPpkL02_Hi_Bc6MfTQk/edit#heading=h.398p6b4eaen2 Bug: chromium:1006766 Change-Id: Ie71474fbe065821772b13d851487ebbca680c4ae Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1947688 Commit-Queue: Sami Kyöstilä <skyostil@chromium.org> Auto-Submit: Sami Kyöstilä <skyostil@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#67217}
-
- 06 Apr, 2020 1 commit
-
-
Marja Hölttä authored
Change-Id: I31aabfe9bdaf02da088620920bbe1e85a9f1859a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135630 Auto-Submit: Marja Hölttä <marja@chromium.org> Reviewed-by: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#67005}
-
- 04 Mar, 2020 1 commit
-
-
Sami Kyostila authored
This patch rolls v8 to the latest Perfetto revision. Since Perfetto has changed the way the GN protobuf integration works, we need to make some corresponding changes in V8. Bug: chromium:639003 Change-Id: I263c591560503c9779bbab3ec266cfb2708fc51f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2085175Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Auto-Submit: Sami Kyöstilä <skyostil@chromium.org> Cr-Commit-Position: refs/heads/master@{#66583}
-
- 24 Jan, 2020 1 commit
-
-
Shu-yu Guo authored
Bug: v8:8179 Change-Id: I3a41243b971d499d50e35c4782bff5b8b012f434 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013695 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#65965}
-
- 08 Jan, 2020 1 commit
-
-
Clemens Backes authored
It has been deprecated in v7.9, but needed to be changed again for v8.0 by providing a default implementation. This allowed embedders to remove all overrides. We can now remove the definitions in v8.1. R=ulan@chromium.org CC=ahaas@chromium.org Bug: v8:9810 Change-Id: I9d303bf8a01d863bce3522abccdd3ded5e551818 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1868620Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#65633}
-
- 02 Jan, 2020 1 commit
-
-
Peter Marshall authored
This was needed for Perfetto at one point but now this is all handled internally by the Perfetto Client API. The implementation was potentially wrong as on some platforms we truncate the the thread ID https://chromium-review.googlesource.com/c/v8/v8/+/1720821/1/src/base/platform/platform-posix.cc#528 Change-Id: I5124f4fb0df4d29ff78ab6c7a2c2b0c9a66a2af3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981508Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#65576}
-
- 08 Nov, 2019 1 commit
-
-
Milad Farazmand authored
All the data types defined under ArgValue are 8 bytes expect "bool as_bool". When casting to <uint64_t> under "tracing/trace-event.h", boolean gets placed on the lower byte of the memory on LE, and on the higher byte on BE machines. When using a "Union" to read back the value as a boolean, only the lower byte of the memory location is read which makes it fine on LE machines, however the value will not be present on BE machines. Using an 8 byte data type as boolean will assure the entire filed is read instead of only the lower byte. Change-Id: I0740b9c019588c963a4c7878af60c6df04827141 TBR: petermarshall@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1896835 Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Junliang Yan <jyan@ca.ibm.com> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#64859}
-
- 16 Sep, 2019 1 commit
-
-
Clemens Hammacher authored
A local build with g++ 8.3.0 failed with two warnings. This CL fixes them. The errors were: 1) error: 'char* strncat(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] 2) error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] R=petermarshall@chromium.org Bug: v8:9396 Change-Id: I175a72435becd694e4151a64e538084ec17d8500 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803636Reviewed-by: Peter Marshall <petermarshall@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#63788}
-
- 13 Sep, 2019 2 commits
-
-
Clemens Hammacher authored
After https://crrev.com/c/1800575 and https://crrev.com/c/1803343, which tried to fix this on occuring compile errors, this CL systematically adds the <memory> include to each header that uses {std::unique_ptr}. R=sigurds@chromium.org TBR=mlippautz@chromium.org,alph@chromium.org,rmcilroy@chromium.org,verwaest@chromium.org Bug: v8:9396 Change-Id: If7f9c3140842f9543135dddd7344c0f357999da0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803349Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#63767}
-
Sigurd Schneider authored
Tbr: yangguo@chromium.org Change-Id: I9e774efdbff94be909470ab848c75e5120bb520e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803343 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#63762}
-
- 10 Sep, 2019 2 commits
-
-
Michael Lippautz authored
Reuse the existing builtin and extension infrastructure to provide a garbage collection mechanism that allows for asynchronous execution. On --expose-gc, this changes the gc call to parse parameters the following: (1) Parse options when encountering an options object with known properties. (2) No parameters is parsed as {type: 'major', execution: 'sync'}. (3) Truthy parameter that is not setting options is parsed as {type: 'minor', execution: 'sync'}. (2) and (3) preserve backwards compatibility for existing callers as this may be used widely across various test and benchmarking infrastructures. Valid options: - type: 'major' or 'minor' for full GC and Scavenge, respectively. - execution: 'sync' or 'async' for synchronous and asynchronous execution respectively. Returns a Promise that resolves when GC is done when asynchronous execution is requested, and undefined otherwise. Note: This is implemented as builtin to avoid having any stack at all. This information is also passed to the embedder to allow skipping stack scanning. Change-Id: Ie5c9b6f0d55238abfeb9051ffa1837501d474934 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1793143 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#63659}
-
Clemens Hammacher authored
Since we switched to C++14 now, we can use {std::make_unique} instead of our own {base::make_unique} from {template-utils.h}. R=mstarzinger@chromium.org, yangguo@chromium.org Bug: v8:9687 No-Try: true Change-Id: I660eb30038bbb079cee93c7861cd87ccd134f01b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1789300 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#63642}
-
- 06 Sep, 2019 1 commit
-
-
Peter Marshall authored
This is a reland of 096d9c56 Fixed DEPS files which were not caught by presubmit trybot Original change's description: > [tracing] Roll perfetto @ 28b633cd > > This catches up with [1] that make the proto include path > relative to the project root rather than ./protos/ > > [1] https://android-review.googlesource.com/c/platform/external/perfetto/+/1108421 > > Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng > Bug: v8:8339 > Change-Id: I1f2dec93120142ea61cee864e4bf76a6947d958d > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776088 > Reviewed-by: Peter Marshall <petermarshall@chromium.org> > Reviewed-by: Tamer Tas <tmrts@chromium.org> > Commit-Queue: Primiano Tucci <primiano@chromium.org> > Auto-Submit: Primiano Tucci <primiano@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63584} Bug: v8:8339 Change-Id: I70e8b2d4520c620d02d5251d14bd61b90fb1d73f Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1789143 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Tamer Tas <tmrts@chromium.org> Cr-Commit-Position: refs/heads/master@{#63598}
-
- 05 Sep, 2019 2 commits
-
-
Santiago Aboy Solanes authored
This reverts commit 096d9c56. Reason for revert: Broke presubmit https://ci.chromium.org/p/v8/builders/ci/V8%20Presubmit/6371 Original change's description: > [tracing] Roll perfetto @ 28b633cd > > This catches up with [1] that make the proto include path > relative to the project root rather than ./protos/ > > [1] https://android-review.googlesource.com/c/platform/external/perfetto/+/1108421 > > Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng > Bug: v8:8339 > Change-Id: I1f2dec93120142ea61cee864e4bf76a6947d958d > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776088 > Reviewed-by: Peter Marshall <petermarshall@chromium.org> > Reviewed-by: Tamer Tas <tmrts@chromium.org> > Commit-Queue: Primiano Tucci <primiano@chromium.org> > Auto-Submit: Primiano Tucci <primiano@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63584} TBR=primiano@chromium.org,petermarshall@chromium.org,tmrts@chromium.org Change-Id: I3ff6afa58869399b2a352cd489acdd2894ef138c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8339 Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1787433Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#63585}
-
Primiano Tucci authored
This catches up with [1] that make the proto include path relative to the project root rather than ./protos/ [1] https://android-review.googlesource.com/c/platform/external/perfetto/+/1108421 Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I1f2dec93120142ea61cee864e4bf76a6947d958d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776088Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Tamer Tas <tmrts@chromium.org> Commit-Queue: Primiano Tucci <primiano@chromium.org> Auto-Submit: Primiano Tucci <primiano@chromium.org> Cr-Commit-Position: refs/heads/master@{#63584}
-
- 06 Aug, 2019 1 commit
-
-
Sami Kyostila authored
Use Perfetto's Start/StopBlocking() helpers instead of bespoke synchronization with semaphores. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: If8266d5fa5e3ff6403b9b2e539ec985bc67fcc90 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1728623 Commit-Queue: Sami Kyöstilä <skyostil@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Auto-Submit: Sami Kyöstilä <skyostil@chromium.org> Cr-Commit-Position: refs/heads/master@{#63102}
-
- 05 Aug, 2019 1 commit
-
-
Peter Marshall authored
Update the TracingCpuProfiler test to work properly with perfetto. Roll perfetto to get fixes for bugs encountered with starting/stopping tracing rapidly, which happens in the test for the tracing profiler. Add a check that the DataSource::Register call was successful to flush out any errors there (although they are fixed by the perfetto roll). Emit a fake trace event when stopping tracing in order to avoid losing the final trace event that the user provided. Remove the ad-hoc fake final trace events that the cctests for perfetto added. Add a test StartAndStopRepeated which flushes out the issues fixed by the perfetto roll. TBR=yangguo@chromium.org Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I042d7385486bf42c86f1631406974693868a477f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1731006 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#63083}
-
- 30 Jul, 2019 1 commit
-
-
Ben L. Titzer authored
This is a reland of a0728e86 Original change's description: > [d8] Remove maximum workers limitation > > This CL refactors the lifetime management of the v8::Worker C++ object > and in the process lifts the 100 maximum worker limitation. To do this, > it uses a Managed<v8::Worker> heap object and attaches the managed to > the API worker object. > > R=mstarzinger@chromium.org > BUG=v8:9524 > > Change-Id: I279b7aeb6645a87f9108ee6f572105739721cef4 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1715453 > Commit-Queue: Ben Titzer <titzer@chromium.org> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#62932} Bug: v8:9524 Change-Id: I7d903fb12ddb00909a9429455f46c55db2fd02de Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1722562Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#62974}
-
- 18 Jul, 2019 1 commit
-
-
Peter Marshall authored
Previously both tracing implementations would be run side-by-side when perfetto was enabled with the V8_USE_PERFETTO build flag. This CL makes them run separately. Both implementations now use the trace file provided by the user in D8 or the default v8_trace.json. Add tests for perfetto events (which must be tested differently due to the proto output format). Drive-by fix: Fix pass-by non-const ref in GetJSONStrings. Remove the TraceEvent struct for testing; we can just store a copy of the protobuf directly. Bug: v8:8339 Change-Id: Id50003e0f96e44b99a63a26693da6bdaca989504 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1702619Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#62810}
-
- 08 Jul, 2019 2 commits
-
-
Peter Marshall authored
The client API provides a much simpler interface so that we don't have to deal with producers, consumers etc. directly. This CL removes all the code that dealt with the more complex API used previously. The architecture used here requires that the embedder call into Tracing::Initialize() to set up the tracing backend. The tracing controller then connects to this backend when calling DataSource::Register() and Tracing::NewTrace(). This will ultimately avoid the need for a virtual call (or two) for every trace event that need to be dispatched over the API - chrome can provide a backend and V8 will connect to it opaquely with the same code when tracing is enabled. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I6b74fbb49ffcc89638caeb59ed3d5cc81238f3e8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1634916Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#62568}
-
Peter Marshall authored
Change-Id: Iee9967b419fbb7cb7a20137a8325097ce9525ee1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690840Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#62562}
-
- 27 May, 2019 2 commits
-
-
Peter Marshall authored
Add a new abstract class TraceEventListener which is just an interface for consuming trace events. This separates the V8-specific stuff that an actual perfetto consumer needs to do e.g. handling the has_more flag and signalling back to the controller with a semaphore. This is a change from the previous plan of making the PerfettoConsumer class sub-classable to implement custom consumption of trace events. This will be difficult when the consumer is created outside of the PerfettoTracingController as we can't hook up the consumer_finished_semaphore_ that belongs to the controller. Now the PerfettoTracingController is responsible for the Consumer life- cycle and hides it entirely from callers. We add the AddTraceEventListener() method to allow callers to register a listener either for testing or a JSON listener for real tracing. This lets us write tests that can store all the trace events in memory without first converting them to JSON, letting us write test more easily. There's an example test add to test-tracing - more tests using this style will follow. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I2d2b0f408b1c7bed954144163e1968f40d772c1b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628789 Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Auto-Submit: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#61854}
-
Clemens Hammacher authored
This replaces all typedefs that define types and not functions by the equivalent "using" declaration. This was done mostly automatically using this command: ag -l '\btypedef\b' src test | xargs -L1 \ perl -i -p0e 's/typedef ([^*;{}]+) (\w+);/using \2 = \1;/sg' Patchset 2 then adds some manual changes for typedefs for pointer types, where the regular expression did not match. R=mstarzinger@chromium.org TBR=yangguo@chromium.org, jarin@chromium.org Bug: v8:9183 Change-Id: I6f6ee28d1793b7ac34a58f980b94babc21874b78 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631409 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#61849}
-
- 23 May, 2019 2 commits
-
-
Peter Marshall authored
Split the JSONConsumer into a base case and subclass so that we can implement different consumers without needing to repeat the code that deals with the finished semaphore and endpoint setters/getters. This makes it possible to add a test consumer that just holds the trace events in memory in a later CL. This CL re-uses the existing perfetto-consumer.h file to some extent, but it was accidentally leftover from a previous CL where we stopped using it and switched to the JSON consumer instead. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I56c305833c8937da76a8e6defbe7a52c59b25106 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621938 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#61799}
-
Peter Marshall authored
This is a reland of a03ed626 Removed the added test which was failing on win32. The test was unrelated to the CL; we can add it later. Original change's description: > [tracing] Add a configurable output stream for perfetto tracing > > Add the ability to provide perfetto with an output stream for the JSON > consumer rather than hardcode it. D8 will use this interface exclusively > once the old trace controller is removed. > > Also add a test for scope-managed trace events and their duration - this > was leftover from a previous CL. > > Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng > Bug: v8:8339 > Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Peter Marshall <petermarshall@chromium.org> > Cr-Commit-Position: refs/heads/master@{#61753} TBR=jgruber@chromium.org, ulan@chromium.org Bug: v8:8339 Change-Id: I3442a4d111e12947c107e7d0c226ae934acd06e4 Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627334Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#61780}
-
- 22 May, 2019 2 commits
-
-
Clemens Hammacher authored
This reverts commit a03ed626. Reason for revert: Fails on win32: https://ci.chromium.org/p/v8/builders/ci/V8%20Win32/21252 Original change's description: > [tracing] Add a configurable output stream for perfetto tracing > > Add the ability to provide perfetto with an output stream for the JSON > consumer rather than hardcode it. D8 will use this interface exclusively > once the old trace controller is removed. > > Also add a test for scope-managed trace events and their duration - this > was leftover from a previous CL. > > Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng > Bug: v8:8339 > Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Peter Marshall <petermarshall@chromium.org> > Cr-Commit-Position: refs/heads/master@{#61753} TBR=ulan@chromium.org,yangguo@chromium.org,jgruber@chromium.org,petermarshall@chromium.org Change-Id: Ie7dbe4fc5f9e496fafc8e3ad2b05011b88c9e2c3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8339 Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625465Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#61754}
-
Peter Marshall authored
Add the ability to provide perfetto with an output stream for the JSON consumer rather than hardcode it. D8 will use this interface exclusively once the old trace controller is removed. Also add a test for scope-managed trace events and their duration - this was leftover from a previous CL. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#61753}
-
- 20 May, 2019 2 commits
-
-
Peter Marshall authored
Previously, compiling with perfetto would add 2.3 MiB to the d8 release binary. With this change it's 472 KiB. This is because trace:lite pulls in many more compiled proto classes than we need, e.g. a bunch of stuff under ftrace/ which is only used on Android. Chrome uses a 'mirror proto' ChromeTrackPacket to only provide compiled protos for the types of packets it will actually see, which on non-android devices does not include anything under ftrace/. We use the same trick here in the JSON consumer. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: Iae1f74eec3bd93b18e9f069701fc016440d3ce5e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619759 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Auto-Submit: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#61662}
-
Peter Marshall authored
COMPLETE events are being deprecated and don't work well with perfetto because we can't give out a handle into the buffer like we used to so that the caller can update the existing event with the duration. BEGIN/END pairs should be used instead to add two separate trace events to the buffer which can be associated with one another by the trace processor e.g. the trace viewer UI. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: Ib73c19d77ad58456ce23d15f0b658c26f3dc3d53 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615257Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#61641}
-
- 16 May, 2019 2 commits
-
-
Peter Marshall authored
Roll perfetto to get the fix for a TSAN race. We need to override a new method on the producer, ClearIncrementalState. It is only called if the producer opts into it, which we do not so we add UNREACHABLE() in the implementation. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I782989f32b511e98479f6637148e3bdd78a6578a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615461Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#61584}
-
Peter Marshall authored
Perfetto has a mechanism for getting trace data from buffers held alive by TraceWriters. We enable this with the SetSMBScrapingEnabled() call. This means we don't need to delete TraceWriter objects and can just leak them for now, and eventually use thread-local destructors to ensure they are eventually deleted on thread exit. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I690bc435c48db6d91eab2fbc7a49ec9feae3b45a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607653 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#61575}
-
- 10 May, 2019 1 commit
-
-
Santiago Aboy Solanes authored
Everything after UNREACHABLE is dead code, so it makes sense to remove them. Bug: v8:9183 Change-Id: If76468a73b926d74717cc2348fd5b36d30f680c1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605727Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#61411}
-