This is the first new style trace event so this CL adds and updates
WebRTCs Perfetto configuration.
* Changes all #includes to target "third_party/perfetto". Added this
to DEPS.
* Expose the Perfetto public config in the "tracing" group using
an all_dependent_configs statement. This means the config is included
in all parts that include the "//:tracing" group. However, direct
perfetto includes are banned per DEPS.
* In order to expose Perfetto types (ie Flow/TerminatingFlow) the
perfetto headers are a dependancy on all targets. This should not
affect binary size as these are not used when perfetto is not enabled
and will not be linked.
Bug: b/42226290
Change-Id: I5711d81dae95ee907cbcd41bf1ee9b55d2ec595c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349161
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#42197}
This adds Perfetto support to WebRTC with a GN flag rtc_use_perfetto.
The configuration of perfetto depends on whether or not webrtc is
build within Chrome or not. When in Chrome, WebRTC will depend on
//third_party/perfetto:libperfetto. When building standalone, specific includes required for Perfetto are exposed with the library webrtc_libperfetto.
The perfetto trace API is exposed with a header export in
trace_event.h which is used instead of the legacy API.
The addition of Perfetto means there are 4 compilation modes for
tracing in WebRTC,
1. No tracing implementation.
2. Legacy tracing (AddTraceEvent/GetCategoryEnabled).
3.a. Perfetto statically linked (webrtc_libperfetto).
3.b. Perfetto in Chrome (Chrome's libperfetto).
This CL removes the tracing expectations from
rtc_stats_integrationtest.cc because those directly used the old API.
Integration into Chrome is a follow up CL which depends on
https://chromium-review.googlesource.com/c/chromium/src/+/5471691.
Tested: Ran Chrome with Perfetto and traces appear. WebRTC Unit test tracing working: https://ui.perfetto.dev/#!?s=04ea2613ea36b814394639a1ec4b60be5b5097527f1a485995ecc13469885468
Bug: webrtc:15917
Change-Id: I537d79dc247c2b759689910c621087286a4d8fdc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347880
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Cr-Commit-Position: refs/heads/main@{#42166}
This field trial is configured via command line flag, so may use flag system directly, reducing dependency on global field trial string.
Bug: webrtc:7101, webrtc:10335
Change-Id: I1e48e0e3fdc251b73a375c6d7f1a46fa4f8a179b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322624
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40897}
Differently from the ChromePerfDashboardMetricsExporter, this new flag
doesn't default to storing the output file to NSDocumentDirectory (and
with a default name, for example perftest-output.pb) but instead
just stores the file at the location specified by --webrtc_test_metrics_output_path.
Bug: b/237982523
Change-Id: Ibb504fdbc94ca5179f4b3da5b06d8cea82140140
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286280
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38807}
By declaring and defining the flag in a separate and reusable library
it can be used by other main() implementations as well.
Bug: b/237982523
Change-Id: Ia5445ee6e85bc1d536bee2ddd842439f8832116b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285480
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#38765}
* Add '--quick' argument to 'low_bandwidth_audio_test' even though it doesn't look like it makes much timing difference.
* Add sharding for 'svc_tests' and 'video_engine_tests'.
Change-Id: I6e3357954d18ad03ea9f62912dd77e0e1a74b97d
Bug: webrtc:14713
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285100
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#38748}
This reverts commit c48a265346.
Reason for revert: logcat issue should be fixed with https://crrev.com/c/4055461.
Original change's description:
> Do not log on stderr on Android tests.
>
> On Pixel 2, this causes an increase in flakiness. This needs to be
> reenabled once the root cause is fixed.
>
> Bug: chromium:1384172, b/259113795
> Change-Id: Ie94d3e2daad3a2de5af673c763362ea1b42fde7d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283522
> Reviewed-by: Jeremy Leconte <jleconte@google.com>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38623}
Bug: chromium:1384172, b/259113795
Change-Id: Iadd7c484f4e73deea952df7980acc0164c96a592
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285021
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38731}
The expected behavior is to have something similar than python:
https://docs.python.org/dev/library/argparse.html#dest:
"Any internal - characters will be converted to _ characters to make sure the string is a valid attribute name".
This allows to catch chromium arguments like 'isolated-script-test-output' that previously needed some preprocessing done for example in flags_compatibility.py.
This CL also fixes a fuchsia specific issue where the test runner needs a 'isolated-script-test-output' argument but then pass the argument to WebRTC that expects a 'isolated_script_test_output' argument. Thus calling flags_compatibility before the test_runner fails and there is not much room to change the argument in between the test runner and the test.
Change-Id: I48a591743fa50484a0ec584a3f9e97d9e0fd25ef
Bug: webrtc:14694
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284541
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38707}
On Pixel 2, this causes an increase in flakiness. This needs to be
reenabled once the root cause is fixed.
Bug: chromium:1384172, b/259113795
Change-Id: Ie94d3e2daad3a2de5af673c763362ea1b42fde7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283522
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38623}
Make it possible to use both APIs inside same test and have consistent
export results to the Chrome Perf Dashboard and stdout.
Bug: b/246095034
Change-Id: I924088a2ddcb04981e56bbeb4544ac317833fb98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276540
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#38177}
This enables the possibility to use these flags from other main
functions.
Bug: b/217701950, b/238157120
Change-Id: I6e9f09c4be39b2ac690c8e6b6da380ef3c81f460
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269140
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37582}
The flags isolated-script-test-output and isolated-script-test-perf-output need to be consumed by the tests.
The generated .app folder in added in the data list of the gni file.
This will make it available in the runtime_deps file and thus will be populated to the swarming tasks.
Bug: webrtc:13556
Change-Id: I2c75774b847d9f686c3abc00ba0400bbc3fcefae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240520
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36029}
In order to unify WebRTC recipes with Chromium recipes this CL tries to revert the old CL https://webrtc-review.googlesource.com/c/src/+/171681.
This CL was already partially reverted (https://webrtc-review.googlesource.com/c/src/+/171809).
In upcoming CLs, the added flag dump_json_test_results will be removed in order to use isolated-script-test-output instead.
Bug: webrtc:13556
Change-Id: I3144498b9a5cbaa56c23b3b8adbac2229ad63c37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/245602
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#35666}
Also re-enable the TestAnnotationsOnWrongQueueDebug test and rename
the test suite to SequenceCheckerDeathTest so that it gets executed
before other tests.
Bug: webrtc:11577
Change-Id: I3b8037644e4b9139755ccecb17e42b09327e4996
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175346
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31290}
Several tests leave pending tasks behind after executing, which may
affect the state of subsequent tests. This CL isolates each test in
the sense that a dedicated Thread instance is created per test and
then pending tasks are flushed and the Thread instance deleted.
Down the line we may want to improve on this and flag those tests
that leave pending tasks/timers etc.
Change-Id: Ibaf3719a9974c57ac2169edca0e2a06a9ea6c78f
Bug: webrtc:11574
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175132
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31268}
Since the flag is now on by default, we can remove it (after all
callers stop passing it).
We can also remove all Chart JSON code from WebRTC since it is
no longer used.
Requires one recipe CL and one downstream CL to land first.
Bug: chromium:1029452
Change-Id: Ic1d62e8ab9dfcd255cd2bf51d153db80d59c564b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171878
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30927}
Since we're now calling the shots of what flags get passed in the
recipes, we can just pass the right ones right away and remove all
the flag renaming.
--isolated-script-test-output is no longer passed, so we can just
remove it. The recipe is currently passing
--isolated-script-perf-test-output but I will start passing the
underscore version shortly.
Bug: chromium:1051927
Change-Id: I571090e62f79ea17c793295df7f5abb21f45d207
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171681
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30878}
We need to write protos as "wb" and not "w", otherwise we get CRLF
on Windows which corrupts the proto.
Bug: chromium:1029452
Change-Id: Iabf841405134d7bc2523ac48219ca7cb9d8214c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170320
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30772}
The --trace_event=file.json option allows to log events,
for further inspection in chromium event viewer.
Previous handling of this option was broken,
closing the logger before the tests were even run.
Bug: webrtc:10926
Change-Id: I9123d12666b5f254feeaef685def96eb8ba1c7f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167720
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30401}
Or, well, to be fair it still kind of does the same thing, but
the thing it's (void)ing in is a lot more related to what it
actually happening. I could not find another way to solve this
since fileutils is fundamentally optional to unit tests, but the
flag isn't.
Bug: webrtc:9792
Change-Id: I6ebf012246bc259883bc0aaf73ac7fea5525dd1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157101
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29501}
I had to change approach. Unfortunately we can't expect
that test_main_lib users link with fileutils, which causes it to
not link when the override symbol is missing.
New approach: resources_dir_flag is now a separate target, it
will be depended upon by the downstream override, which just
reads the flag and returns it as the resource dir. This gets
rid of the mutable state downstream as well.
So:
1) Land this
2) Make downstream read the flag instead of keeping its own state
3) Remove OverrideResourcesDir upstream and clean up the hacks
4) Remove the now orphaned OverrideResourcesDir downstream
Bug: webrtc:9792
Change-Id: Ic2ef3910bb5d39d9fb71e06fbbbb6aec4de52e78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157041
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29487}
We needed a hack in test_main_lib.cc to ensure fileutils were always
linked with test binaries downstream. When I removed the hack, it
broke the binaries that were _not_ using fileutils because a certain
bazel rule expects to be able to pass the flag to all test binaries.
The solution is to move the flag to test_main_lib.cc. This is the
right place for it since it's apparently in the contract of a WebRTC
test binary to support this flag. We then have to pass the value
down to the override, which is why I add a new function for that.
I leave the flag unimplemented in OSS because no one is using it
here anyway. It will be implemented downstream.
Bug: webrtc:9792
Change-Id: I21b3deb43bf0cd56d6aa2622dc5519370a0307a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156568
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29474}
Add ability to export internal state of SamplesStatsCounter to be able
then to plot that data.
Bug: webrtc:10138
Change-Id: I5aae5b7dea2989e9f82820933a9ab6f21db17556
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152542
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29173}
This is the last CL required to migrate WebRTC to ABSL_FLAG, rtc::Flag
will be removed soon after this one lands.
Bug: webrtc:10616
Change-Id: I2807cec39e28a2737d2c49e2dc23f2a6f98d08f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145727
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28606}
It's easy to make small errors when building field trial strings, and
those errors can cause all sorts of weird problems. This CL checks if
the FT string has an odd number of delimiters, duplicate
names or any trailing chars.
If so we'll log a error message. On debug builds we'll also crash.
Bug: webrtc:10729
Change-Id: Iebf7155d9b117a02d1e9cfe7f64408e11df2aec5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140866
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28234}
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.
Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
This is a reland of 5ccdc1331f
Original change's description:
> Prefix flag macros with WEBRTC_.
>
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
>
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
>
> This CL adds the 'WEBRTC_' prefix to them.
>
> Generated with:
>
> for x in DECLARE DEFINE; do
> for y in bool int float string FLAG; do
> git grep -l "\b$x\_$y\b" | \
> xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
> done
> done
> git cl format
>
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}
TBR=kwiberg@webrtc.org
Bug: webrtc:9884
Change-Id: I5ba5368a231a334d135ed5e6fd7a279629ced8a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/107161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25277}
This reverts commit 5ccdc1331f.
Reason for revert: Breaks downstream project.
Original change's description:
> Prefix flag macros with WEBRTC_.
>
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
>
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
>
> This CL adds the 'WEBRTC_' prefix to them.
>
> Generated with:
>
> for x in DECLARE DEFINE; do
> for y in bool int float string FLAG; do
> git grep -l "\b$x\_$y\b" | \
> xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
> done
> done
> git cl format
>
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
Change-Id: Ia79cd6066ecfd1511c34f1b30fd423e560ed6854
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9884
Reviewed-on: https://webrtc-review.googlesource.com/c/107160
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25276}
We want sanitizer bots to show failure only for sanitizer defects.
To do so, this CL forces exit code to 0 unconditionally.
Sanitized binaries will turn it to 66 if there is any defect with diagnostic.
Bug: webrtc:9849
Change-Id: I46b683dcae12b76f1be177603af59e3f34bff3a9
Reviewed-on: https://webrtc-review.googlesource.com/c/107060
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25273}
Macros defined in rtc_base/flags.h are intended to be used to define
flags in WebRTC's binaries (e.g. tests).
They are currently not prefixed and this could cause problems with
downstream clients since these names are quite common.
This CL adds the 'WEBRTC_' prefix to them.
Generated with:
for x in DECLARE DEFINE; do
for y in bool int float string FLAG; do
git grep -l "\b$x\_$y\b" | \
xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
done
done
git cl format
Bug: webrtc:9884
Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
Reviewed-on: https://webrtc-review.googlesource.com/c/106682
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25270}
These two files were using absl::make_unique without #including the
header that declares it.
Bug: None
Change-Id: I03019c9a7e06370631680b474d04dd33716b0fe3
Reviewed-on: https://webrtc-review.googlesource.com/c/107041
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25266}