Commit graph

59 commits

Author SHA1 Message Date
Danil Chapovalov
14b016fbf9 In RtcEventLogEncoderNewFormat use propagated instead of global field trials
Bug: webrtc:10335
Change-Id: Id407a7bc25375cadccba4cf4ae0c771f22a19a0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333581
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41644}
2024-01-31 15:23:24 +00:00
Danil Chapovalov
dc64596510 Remove RtcEventLogImpl dependency on rtc::TaskQueue
same functionality can be achieved by using TaskQueueBase directly

Bug: webrtc:14169
Change-Id: Id7c27afdbf61b4cab3d006d9a7b690b915759cdb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333440
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41476}
2024-01-08 12:12:10 +00:00
Danil Chapovalov
c41977d303 Propagate Environment into RtcEventLogImpl
With intention to propagte it futher into RtcEventLogEncoderNewFormat
where it can replace usage of the global field trials

Same environment can be saved in RtcEventLogImpl itself wthere it can
replace usage of the global clock

Bug: webrtc:10335
Change-Id: Ia147d7073af5aab54190fdf192cd5c046c3d40a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330423
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41472}
2024-01-05 11:28:00 +00:00
Jianhui Dai
0a025345fe RtcEventLog: Separate LogToMemory from TaskQueue to current thread
Original implementation uses TaskQueue to async execute both `LogToMemory` and `WriteToOutput`. `LogToMemory` is invoked in high frequency, but the execution takes a very short time. It would be a bit more expensive to post on TaskQueue than execution on current thread with locking. It is because that the TaskQueue switches the thread context for execution.

This CL separates `LogToMemory` from TaskQueue to current thread, in
order to avoid frequent context switching; And periodically schedule
`WriteToOutput` to TaskQueue, not block current thread.

Link: https://webrtc-review.googlesource.com/c/src/+/283641
Bug: chromium:1288710
Change-Id: Ic78216aff16d1883b109e360a0892da3ca8f5ecb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295640
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/main@{#39629}
2023-03-21 23:07:40 +00:00
Danil Chapovalov
f4dfa1ce01 Reassign TODO from self to bug with more context
No-try: true
Bug: webrtc:14449
Change-Id: Iab1954d4a7a2fd791ad2ac97062ac73d5ce372dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296581
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39501}
2023-03-08 09:02:13 +00:00
Markus Handell
f015a12802 RtcEventLogImpl: Add mocked time test.
This change adds mocked time unit tests to RtcEventLogImpl. In
order to simplify test implementation, the Impl ctor was changed
to accept an already created event log encoder. The previous
factory was made public in the Impl interface and relevant
code sites were updated.

Bug: chromium:1288710
Change-Id: Ifbfd899c5a06a3350c7e5fbc3bb7280f67124f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290382
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38987}
2023-01-03 14:08:16 +00:00
Danil Chapovalov
c05a1be5b4 Migrate remaining webrtc usage of TaskQueueBase to absl::AnyInvocable
Bug: webrtc:14245
Change-Id: I8de2c23da5fbdfc0b1efbbe07fb6e8de744424a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268191
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37565}
2022-07-20 08:15:08 +00:00
Ali Tofigh
277766f55e adopt absl::string_view in logging/
Bug: webrtc:13579
Change-Id: Ibc5fa7842d52321d61cc4cdd4770635af737ddff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267170
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37533}
2022-07-15 16:08:39 +00:00
Markus Handell
9a665402d7 Reland "TaskQueue: unexpose delayed task convenience methods."
This reverts commit 4cd3a0d082.

Reason for revert: Downstream build should be fixed.

Original change's description:
> Revert "TaskQueue: unexpose delayed task convenience methods."
>
> This reverts commit 08bb6295ea.
>
> Reason for revert: Breaks downstream tests
>
> Original change's description:
> > TaskQueue: unexpose delayed task convenience methods.
> >
> > Bug: webrtc:14165
> > Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Auto-Submit: Markus Handell <handellm@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37166}
>
> Bug: webrtc:14165
> Change-Id: Ia7368cf205622be448ec0ead5d22f211aa071a29
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265411
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Björn Terelius <terelius@webrtc.org>
> Auto-Submit: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37167}

Bug: webrtc:14165
Change-Id: I3d963d272e8a1431103a5d5fb4568ccacd81119c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265395
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37186}
2022-06-13 07:27:37 +00:00
Björn Terelius
4cd3a0d082 Revert "TaskQueue: unexpose delayed task convenience methods."
This reverts commit 08bb6295ea.

Reason for revert: Breaks downstream tests

Original change's description:
> TaskQueue: unexpose delayed task convenience methods.
>
> Bug: webrtc:14165
> Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37166}

Bug: webrtc:14165
Change-Id: Ia7368cf205622be448ec0ead5d22f211aa071a29
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265411
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37167}
2022-06-09 15:48:23 +00:00
Markus Handell
08bb6295ea TaskQueue: unexpose delayed task convenience methods.
Bug: webrtc:14165
Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37166}
2022-06-09 14:08:54 +00:00
Tommi
4be7fbb81e Change frequently run log statements in RtcEventLog to DLOG.
This substantially reduces the amount of text logged in release
builds when running:

rtc_unittests.exe --gtest_filter=*RtcEventLog*

Bug: none
Change-Id: I7b7c7e66fa467924e4414f1d9bfc1590ff01e0c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249981
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35859}
2022-01-31 16:42:27 +00:00
Artem Titov
6cae2d5513 Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 3f87250a4f.

Reason for revert: Downstream is fixed

Original change's description:
> Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
>
> This reverts commit 5f0eb93d2a.
>
> Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.
>
> Original change's description:
> > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
> >
> > Bug: webrtc:13555, webrtc:13082
> > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Artem Titov <titovartem@webrtc.org>
> > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> > Cr-Commit-Position: refs/heads/main@{#35805}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13555, webrtc:13082
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35807}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:13555, webrtc:13082
Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35814}
2022-01-27 12:55:44 +00:00
Artem Titov
3f87250a4f Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 5f0eb93d2a.

Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.

Original change's description:
> Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
>
> Bug: webrtc:13555, webrtc:13082
> Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> Cr-Commit-Position: refs/heads/main@{#35805}

TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13555, webrtc:13082
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35807}
2022-01-26 14:56:14 +00:00
Byoungchan Lee
5f0eb93d2a Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
Bug: webrtc:13555, webrtc:13082
Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35805}
2022-01-26 14:22:16 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Artem Titov
af9a3c6676 Use backticks not vertical bars to denote variables in comments for /logging
Bug: webrtc:12338
Change-Id: I87d33f201d4acfb26ca1d2da8a52cc188ff2c791
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226948
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34609}
2021-07-30 19:19:34 +00:00
Björn Terelius
ada810aab2 Reland "Deprecate microsecond timestamps in RTC event log."
This is a reland of e6ee8fab7e

Original change's description:
> Deprecate microsecond timestamps in RTC event log.
>
> (Microsecond timestamps are only used in the legacy wire-format,
> and the clocks only have microsecond resolution on some platforms.)
>
> Also convert structs on the parsing side to use a Timestamp instead
> of a uint64_t to represent the log time.
>
> Bug: webrtc:11933
> Change-Id: Ide5a0217d99f13f2e243115b163f13e0525648c7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219467
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34097}

Bug: webrtc:11933
Change-Id: I295be966ee96b50719ceb4690dad7e7ce958dbac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221361
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34321}
2021-06-17 12:08:54 +00:00
Björn Terelius
2fa4774067 Revert "Deprecate microsecond timestamps in RTC event log."
This reverts commit e6ee8fab7e.

Reason for revert: Breaks downstream test

Original change's description:
> Deprecate microsecond timestamps in RTC event log.
>
> (Microsecond timestamps are only used in the legacy wire-format,
> and the clocks only have microsecond resolution on some platforms.)
>
> Also convert structs on the parsing side to use a Timestamp instead
> of a uint64_t to represent the log time.
>
> Bug: webrtc:11933
> Change-Id: Ide5a0217d99f13f2e243115b163f13e0525648c7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219467
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34097}

TBR=terelius@webrtc.org,srte@webrtc.org,crodbro@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I478c9a4a1664b984891c4fcfc78f0ce9a51fe4c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11933
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219636
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34100}
2021-05-24 13:11:10 +00:00
Björn Terelius
e6ee8fab7e Deprecate microsecond timestamps in RTC event log.
(Microsecond timestamps are only used in the legacy wire-format,
and the clocks only have microsecond resolution on some platforms.)

Also convert structs on the parsing side to use a Timestamp instead
of a uint64_t to represent the log time.

Bug: webrtc:11933
Change-Id: Ide5a0217d99f13f2e243115b163f13e0525648c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219467
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34097}
2021-05-24 11:39:02 +00:00
Jonas Olsson
b2b2031457 Concatenate string literals at compile time.
This CL was generated by running:
git ls-files | grep ".cc" | xargs perl -i -ne 'BEGIN {undef $/}; s/("[\s\n]*<<[\s\n]*")/" "/g; print;'; git cl format

After that I manually edited modules/audio_processing/gain_controller2.cc to preserve its original
formatting.

This primary benefit of this change is a small reduction in binary size.

Bug: None
Change-Id: I689fa7ba9c717c314bb167e5d592c3c4e0871e29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165961
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30251}
2020-01-14 14:47:48 +00:00
Danil Chapovalov
912b3b83b3 Make rtc::Thread a TaskQueue
in support of converging on single way to run asynchronous tasks in webrtc

Bug: b/144982320
Change-Id: I200ad298136d11764a3f5c0547ebcba51aceafa0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158782
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29896}
2019-11-25 11:38:27 +00:00
Sebastian Jansson
60bd1aea3d Detach thread checker in RtcEventLogImpl destructor.
Otherwise we require that the destructor must run on the same thread as
previous calls. This is not necessary since we can assume there's no
other references to the instance when we enter the destructor.

Bug: webrtc:9883
Change-Id: Ia254bce9265979da0e25ba33598edd8f807d7e00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159704
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29793}
2019-11-13 15:42:19 +00:00
Sebastian Jansson
86314cfb5d Cleaning up C++14 move into lambda TODOs.
Bug: webrtc:10945
Change-Id: I4d2f358b0e33b37e4b4f7bfcf3f6cd55e8d46bf9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153240
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29212}
2019-09-17 19:18:26 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Nikita Zetilov
a550dad57a Minor rtc_event_log_impl cleanup.
Removed unused variables.

Bug: webrtc:10756
Change-Id: I7ce8fc3fc5a3c269b4ee74d77425c3e240d91525
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28334}
2019-06-20 11:57:54 +00:00
Sebastian Jansson
58c71db1b3 Fix for crash in event log when using scenario tests.
Scenario tests runs all its activities on task queues. This is not
allowed by the default event log writer, causing a DCHECK failure.
This CL makes it possible to stop the event asynchronously,
thereby avoiding the need for the DCHECK.

Bug: webrtc:10365
Change-Id: I1206982b29fd609ac85b4ce30ae9291cbec52041
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136685
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28027}
2019-05-22 15:22:49 +00:00
Danil Chapovalov
b32f2c7f57 Publish rtc event log api and default factory for it in api/
Bug: webrtc:10206
Change-Id: I34194ddb6fd2b0a3d7c553fadc9ddc1ea9740da0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137500
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28023}
2019-05-22 13:38:25 +00:00
Elad Alon
2a1f020dd9 Remove RtcEventLogImpl::owner_sequence_checker_
This sequence checker was necessary back when a concern existed
over calling StopLogging() twice. That is no longer a concern.

Bug: webrtc:10613
Change-Id: Ib28d876a8c1940e76d4914287043cce2a1d974b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135949
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27914}
2019-05-10 14:14:03 +00:00
Danil Chapovalov
304ea5f7b0 Add RtcEventLogFactory factory with explicit TaskQueueFactory
remove RtcEventLog factory function that relies on GlobalTaskQueueFactory,
move that default behaviour up to RtcEventLogFactory level.

Bug: webrtc:10284
Change-Id: I512d8a13e6a2f320000dd08e6355c0a7e9de8561
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132542
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27573}
2019-04-11 16:05:09 +00:00
Sebastian Jansson
b55015e4e1 Replacing SequencedTaskChecker with SequenceChecker.
Bug: webrtc:9883
Change-Id: I5e3189da2a46e6f4ed1a3c5a5dfd2f7d75a16b5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130961
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27518}
2019-04-09 12:28:04 +00:00
Benjamin Wright
f1c9e21366 ClangTidy fixes for logging/
These are manual edits please verify there are no typos.
Feel free to auto-submit if there are no issues.

Bug: webrtc:10410
Change-Id: I2ea59dc66230182bee6ae7a0925aed0fe9ef823c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127643
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27133}
2019-03-14 14:51:00 +00:00
Danil Chapovalov
471783fc87 Remove rtc::QueuedTask alias, use webrtc::QueuedTask directly
Use absl::WrapUnique/absl::make_unique to create the queued tasks.

Bug: webrtc:10191
Change-Id: I8f47a60cb326b0fc361c7f0e338b25373d39937c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126525
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27063}
2019-03-11 16:49:21 +00:00
Sebastian Jansson
b8a4d688f9 Allow injection of task queue factory in RtcEventLog.
Bug: webrtc:10365
Change-Id: I48dcaaa7cecf8a201a30b81f23056a4d3a72c5a4
Reviewed-on: https://webrtc-review.googlesource.com/c/124825
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26906}
2019-02-28 16:59:54 +00:00
Bjorn Terelius
5c2f1f053f Add some missing includes and dependencies.
In particular, time_utils.h is currently pulled in via rtc_event.h
This CL is in preparation of moving parts of the RTC event log to api/.

Bug: webrtc:10206
Change-Id: Idd35aa9404afded4d29b1296344996c45b8c2e91
Reviewed-on: https://webrtc-review.googlesource.com/c/117921
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26326}
2019-01-18 15:30:26 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Bjorn Terelius
bd2cf71865 Remove functions to inject a TaskQueue in RtcEventLog creation.
The event log implementation will be simpler if it creates its own TaskQueue.
If we really need the "injectable" functionality, it could be achieved via a
TaskQueueFactory that returns a move-constructible TaskQueue.

Bug: webrtc:10085
Change-Id: I538be3dd77c09be2f5bae015227067acd6af8355
Reviewed-on: https://webrtc-review.googlesource.com/c/113140
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25908}
2018-12-05 16:35:04 +00:00
Elad Alon
e7673cf922 RtcEventLogImpl nits
1. Make |output_period_ms_| optional, so as to clarify where
   it gets assigned a value. (I.e. the value set by the ctor
   is not retained.)
2. Some extra const modifiers.

Bug: webrtc:8111
Change-Id: I9f3ad7ff763cfbc9c9385f7fd4325ba696772765
Reviewed-on: https://webrtc-review.googlesource.com/c/112588
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25877}
2018-12-03 13:50:43 +00:00
Elad Alon
aa3d8ad71b Reland "Fix output period in RtcEventLogImpl"
This is a reland of a4dcb749fb

Original change's description:
> Fix output period in RtcEventLogImpl
> 
> RtcEventLogImpl::StartLogging() was ignoring one of its parameters.
> This CL fixes the issue.
> 
> Bug: webrtc:10082
> Change-Id: Ie1790c1a7299748dabe99909d967384ad9895635
> Reviewed-on: https://webrtc-review.googlesource.com/c/112586
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25858}

Bug: webrtc:10082
Change-Id: I783fba84aa35e489f6235538c624b19f2f98a962
Reviewed-on: https://webrtc-review.googlesource.com/c/112860
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25876}
2018-12-03 12:48:42 +00:00
Elad Alon
ad82a424e4 Fix race over RtcEventLogImpl::task_queue_
RtcEventLogImpl::task_queue_ is a std::unique_ptr<rtc::TaskQueue>.
When a unique_ptr is destroyed, it first sets its internal pointer
to point to null, and only then invokes the destructor of that
object. However, the code in RtcEventLogImpl relies on
rtc::TaskQueue's property, that its destructor blocks on executing
tasks.

We solve by manually invoking the destructor, and only resetting
the internal pointer thereafter. In theory, we could have changed
the unique_ptr to a raw pointer at this point. We avoid that, so
as to keep the ownership clearer to readers of the code.

Bug: webrtc:10085
Change-Id: I54bbf5d6bae019757ca2e31ee960d558058ccc42
Reviewed-on: https://webrtc-review.googlesource.com/c/112598
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25875}
2018-12-03 12:41:21 +00:00
Qingsi Wang
2bb96682a2 Revert "Fix output period in RtcEventLogImpl"
This reverts commit a4dcb749fb.

Reason for revert: Speculative revert. Tsan failure has been consistently generated after this CL.

Original change's description:
> Fix output period in RtcEventLogImpl
> 
> RtcEventLogImpl::StartLogging() was ignoring one of its parameters.
> This CL fixes the issue.
> 
> Bug: webrtc:10082
> Change-Id: Ie1790c1a7299748dabe99909d967384ad9895635
> Reviewed-on: https://webrtc-review.googlesource.com/c/112586
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25858}

TBR=eladalon@webrtc.org,terelius@webrtc.org

Change-Id: I6b79c207d537ab6ca44bb418958854acebc886ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10082
Reviewed-on: https://webrtc-review.googlesource.com/c/112740
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25864}
2018-12-01 00:48:09 +00:00
Elad Alon
a4dcb749fb Fix output period in RtcEventLogImpl
RtcEventLogImpl::StartLogging() was ignoring one of its parameters.
This CL fixes the issue.

Bug: webrtc:10082
Change-Id: Ie1790c1a7299748dabe99909d967384ad9895635
Reviewed-on: https://webrtc-review.googlesource.com/c/112586
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25858}
2018-11-30 15:03:23 +00:00
Bjorn Terelius
e78b465d45 Add version and UTC time fields to RTC event log.
Bug: webrtc:8111
Change-Id: I843e1f8e50e4d4faf74819e0104aeb4fb869b834
Reviewed-on: https://webrtc-review.googlesource.com/c/110721
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25658}
2018-11-15 14:32:43 +00:00
Niels Möller
c572ff3c71 Add default constructor for rtc::Event
Bug: webrtc:9962
Change-Id: Icaa91e657e6881fcb1553f354c07866109a0ea68
Reviewed-on: https://webrtc-review.googlesource.com/c/109500
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25535}
2018-11-07 08:57:50 +00:00
Bjorn Terelius
b26cf2f130 Add field trial to enable the new RTC event log format.
Bug: webrtc:8111
Change-Id: Iffcd294a8ee9342a5f1e5ad07cb320d19323e37e
Reviewed-on: https://webrtc-review.googlesource.com/c/108161
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25429}
2018-10-30 13:48:38 +00:00
Bjorn Terelius
c35096d975 Reland "Encode RTC event logs in new format."
This is a reland of ece3c228a2

Original change's description:
> Encode RTC event logs in new format.
> 
> This CL adds the encoder and wires it up to the event log.
> Parser and unit tests are uploaded in a separate CL.
> 
> Bug: webrtc:8111
> Change-Id: I6470003e55c2c4006cd8349a2c4bdc3f9491d869
> Reviewed-on: https://webrtc-review.googlesource.com/c/106708
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25333}

Bug: webrtc:8111
Change-Id: I22eeca36d6b1f7cfa1ac65347571ebe33cecc1fc
Reviewed-on: https://webrtc-review.googlesource.com/c/108082
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25382}
2018-10-26 09:20:02 +00:00
Mirko Bonadei
825f83b99e Revert "Encode RTC event logs in new format."
This reverts commit ece3c228a2.

Reason: Breaks downstream project.

Bug: webrtc:8111
Change-Id: Ia264802b35a576d74b8a249ed742a8177e5cbe24
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/107721
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25340}
2018-10-24 13:18:03 +00:00
Bjorn Terelius
ece3c228a2 Encode RTC event logs in new format.
This CL adds the encoder and wires it up to the event log.
Parser and unit tests are uploaded in a separate CL.

Bug: webrtc:8111
Change-Id: I6470003e55c2c4006cd8349a2c4bdc3f9491d869
Reviewed-on: https://webrtc-review.googlesource.com/c/106708
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25333}
2018-10-24 12:21:43 +00:00
Danil Chapovalov
608298b6ae Move RtcEventLog::CreateNull implementation near declaration.
having implementation and declaration in same build target helps
setting dependencies

Bug: None
Change-Id: Ibf22e9c8781def9d84ce4562d0f0eaba5abd39cf
Reviewed-on: https://webrtc-review.googlesource.com/c/106900
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25255}
2018-10-18 13:39:58 +00:00
Bjorn Terelius
d8be107c8b Print timestamp-to-UTC map when event_log starts.
Bug: None
Change-Id: I9ba392e3ace79b5dbc7342200565004ea5cd844e
Reviewed-on: https://webrtc-review.googlesource.com/93300
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24258}
2018-08-10 10:04:12 +00:00