- 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}
-
- 09 May, 2019 1 commit
-
-
Peter Marshall authored
We pretty much always want tracing data as a JSON file. Implement a Consumer which converts protos to the JSON trace events format. This duplicates a lot of the internals of TraceWriter in trace-writer.cc but we will remove that eventually. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I85f86562f1b3c4d24ecd755413d1c3f88b292adb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541042 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#61366}
-
- 08 May, 2019 2 commits
-
-
Peter Marshall authored
Perfetto will actually call this from the main thread in various cases so we need to implement it. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I509fa277fb0f7e98e9dea4d991a2d313e0a249da Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1599183Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#61320}
-
Peter Marshall authored
This is needed for Perfetto which sometimes chooses to bypass the task queue if the task queue uses a given thread to run tasks. Bug: v8:8339 Change-Id: Iecec5e7883d174e4b63495ecdadfb96105e4505c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1588471 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Auto-Submit: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#61316}
-
- 03 May, 2019 1 commit
-
-
Peter Marshall authored
Based on Primiano's prototype: https://chromium-review.googlesource.com/c/v8/v8/+/1290549 This is still behind a build flag. I'll add functionality incrementally rather than land everything in one giant CL. This CL sets up the basic classes that will be used for the Perfetto implementation, e.g. the producer, consumer, controller and task runner. This implementation produces a binary proto file in the current directory named v8_trace.proto. It doesn't yet produce JSON output, that is coming in a following CL. Currently the old tracing and perfetto tracing are both run alongside each other if the build flag is enabled. Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng Bug: v8:8339 Change-Id: I0eb9ecefa191ceead60aadd5b591d75c99395a6e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1408995Reviewed-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@{#61209}
-
- 22 Mar, 2019 1 commit
-
-
Peter Marshall authored
We were hitting a DCHECK in WaitFor() when rel_time was negative. This was caused when GetNext() recalculated the wait time for a delayed task. In the first part of the loop we moved all delayed tasks which have passed their deadline into the immediate task queue. At the bottom of the loop we assume that all delayed tasks in the queue have a deadline in the future, but this isn't always the case as we use a new 'now' value for the calculation, and time could have elapsed. Fix this by using one 'now' value for an iteration of the loop. Bug: v8:9030 Change-Id: Ia49fb571f3c7c7d9f15c6a464ee0a9db814a7f03 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535820 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Cr-Commit-Position: refs/heads/master@{#60409}
-
- 19 Mar, 2019 1 commit
-
-
Peter Marshall authored
This was unimplemented but is needed for Perfetto which posts delayed tasks on worker threads e.g. drain the trace buffer into a file every x seconds. This is implemented by adding a second queue which holds the delayed tasks in chronological order of 'next-to-execute'. We use an std::multimap for the queue so that we can easily get the next delayed task with begin(). The implementation will move delayed tasks into the main task queue when their deadline expires. Drive-by cleanup of the runner destructor which can just use = default. Bug: v8:8339 Change-Id: I3629c5d6e15ced2fc47eb1b7519a2dbbf8461fce Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521114 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#60320}
-
- 13 Mar, 2019 1 commit
-
-
Benedikt Meurer authored
The JSONTraceWriter didn't write the "flow_in", "flow_out" and "bind_id" fields, which are necessary to support TRACE_EVENT_WITH_FLOW and friends. This just mirrors the logic from trace_event_impl.cc in Chrome. Bug: v8:8991 Change-Id: I496db587fbb74d3c7205bbab4c23ec41c63fa715 Document: http://bit.ly/v8-tracing-signals Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521108Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#60218}
-
- 21 Feb, 2019 1 commit
-
-
Peter Marshall authored
The default TracingController (used by d8 and Node) has some concurrency issues. The new test flushes these out, when a second thread logs trace events while the main thread calls StopTracing(). - Use an acquire load in UpdateCategoryGroupEnabledFlags() because this was racing with GetCategoryGroupEnabled() where a new category is added in the slow path. g_category_groups is append-only, but reads/writes to g_category_index need to be correctly ordered so that new categories are added and only then is the change to the index visible. The relaxed load ignored this and caused unsynchronized read/write. - Use a relaxed load in ~ScopedTracer() to access category_group_enabled as this previously used a non-atomic operation which caused a race with UpdateCategoryGroupEnabledFlag() which does a relaxed store. - Replace TracingController::mode_ with an atomic bool as read/writes to mode_ were not synchronized and caused TSAN errors. It only has two states and it doesn't seem like we will extend this so just convert it to bool. - Take the lock around calling trace_object->Initialize in AddTraceEvent(), and around trace_buffer_->Flush() in StopTracing(). These two raced previously as the underlying TraceBufferRingBuffer passes out pointers to TraceObjects in a synchronized way, but the caller (AddTraceEvent) then writes into the object without synchronization. This leads to races when Flush() is called, at which time TraceBufferRingBuffer assumes that all the pointers it handed out are to valid, initialized TraceObjects - which is not true because AddTraceEvent may still be calling Initialize on them. This could be the cause of issues in Node.js where the last line of tracing/logging sometimes gets cut off. This is kind of a band-aid solution - access to the TraceObjects handed out by the ring buffer really needs proper synchronization which at this point would require redesign. It's quite likely we will replace this with Perfetto in the near future so not much point investing in this code right now. - Enable TracingCpuProfiler test which was flaky due to these bugs. Bug: v8:8821 Change-Id: I141296800c6906ac0e7f3f21dd16d861b07dae62 Reviewed-on: https://chromium-review.googlesource.com/c/1477283 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com> Cr-Commit-Position: refs/heads/master@{#59752}
-
- 19 Feb, 2019 1 commit
-
-
Peter Marshall authored
- Switch #define constant to static const - Remove unnecessary Internal version of GetCategoryGroupEnabled() - Fix a typo in a comment Change-Id: I4af71dc62c7c4742bdfbcaa1ad336298eb325c42 Reviewed-on: https://chromium-review.googlesource.com/c/1477221Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#59708}
-
- 11 Feb, 2019 1 commit
-
-
Dan Elphick authored
Removes deprecated platform::CreateDefaultPlatform, Object::GetPropertNames/GetOwnPropertyNames/HasRealNamedProperty/ HasRealIndexedProperty/HasRealNamedCallbackProperty, Function::New/Call and Isolate::SetWasmCompileStreamingCallback. Change-Id: I00c73576bbfbdc6bbe72bad9ac9d7a338a5bf068 Reviewed-on: https://chromium-review.googlesource.com/c/1460952Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#59510}
-
- 12 Oct, 2018 1 commit
-
-
Clemens Hammacher authored
LockGuard is mostly used with Mutex. Since both are defined outside the internal namespace, we often have to write {base::LockGuard<base::Mutex>}. This CL shortens this to {base::MutexGuard} across the code base R=mlippautz@chromium.org Bug: v8:8238 Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I020d5933b73aafb98c4b72e3bb2dfd07c979ba73 Reviewed-on: https://chromium-review.googlesource.com/c/1278796Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56612}
-