Commit graph

10 commits

Author SHA1 Message Date
Jared Siskin
6f86f6af00 Format /sdk
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^sdk/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: If05d3c7555c4f2bf25e387249932787a93aa39c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302060
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39913}
2023-04-21 04:30:57 +00:00
Niels Möller
00e93249ca Refactor android stacktrace
Move global state into a singleton class. Eliminates use of
GlobalMutex. Also use std::atomic rather than volatile, for improved
thread safety.

Bug: webrtc:11567
Change-Id: I305d16ed2f4a9a6497df119e66d9bba08337339a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258120
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36475}
2022-04-07 08:32:42 +00:00
Artem Titov
d7ac581045 Use backticks not vertical bars to denote variables in comments for /sdk
Bug: webrtc:12338
Change-Id: Ifaad29ccb63b0f2f3aeefb77dae061ebc7f87e6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227024
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34561}
2021-07-27 14:39:06 +00:00
Markus Handell
0dd35d3732 Migrate to webrtc::GlobalMutex.
Bug: webrtc:11567
Change-Id: I853434745c427e54474739e9c573e0f6f4fcedef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179283
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31732}
2020-07-15 10:32:20 +00:00
Magnus Jedvert
3d687a1e3e Add null checks in stacktrace.cc
We have seen crashes originating from derefencing nullptrs in this code,
for unknown reasons. This CL adds null checks to protect against this.
The stacktraces will be missing or truncated when this happens.


Bug: b/147338449
Change-Id: Ieb006f0f8dec4f9621e4df2e2c1a9641f086df86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173593
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31079}
2020-04-16 09:26:11 +00:00
Danil Chapovalov
5740f3e2b8 Clarify expectation on GlobalLock
Merge GlobalLock and GlobalLockPod, make member private.
annotate creation of all GlobalLocks with ABSL_CONST_INIT

Bug: None
Change-Id: I29abcc86796ec0e45b15df7d26392309d1bf7324
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156303
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29447}
2019-10-11 13:11:11 +00:00
Karl Wiberg
c130d42aab Add ability to unwind stack for the current thread
Bug: webrtc:10308
Change-Id: Ia82cb7512524bede8da69bbc747ece6e718733ab
Reviewed-on: https://webrtc-review.googlesource.com/c/124993
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26945}
2019-03-04 10:31:40 +00:00
Magnus Jedvert
7510e4aac5 Reland "Android: Add helper methods for printing native stack traces"
This is a reland of dc32cc00e8

Relanding because this CL was not the culprit for the Chrome bot.
(This code shouldn't even be executed in Chrome).

Original change's description:
> Android: Add helper methods for printing native stack traces
>
> This CL adds utility functions to unwind the stack for a given thread on
> Android ARM devices. This works on top of unwind.h and unwinds native
> (C++) stack traces only. Unwinding a thread from another thread is done
> by overriding the signal handler with a custom function and then
> interrupting the specific thread.
>
> Bug: webrtc:10168
> Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
> Reviewed-on: https://webrtc-review.googlesource.com/c/118141
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26328}

TBR=tommi

Bug: webrtc:10168
Change-Id: I4c33c2c147cf10c0172c98a55d32dd35a08517c8
Reviewed-on: https://webrtc-review.googlesource.com/c/118704
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26341}
2019-01-21 15:18:56 +00:00
Magnus Jedvert
700615fb1c Revert "Android: Add helper methods for printing native stack traces"
This reverts commit dc32cc00e8.

Reason for revert: Seems to be breaking Chromium FYI, https://www.google.com/url?q=https://ci.chromium.org/p/chromium/builders/luci.chromium.webrtc.fyi/WebRTC%2520Chromium%2520FYI%2520Android%2520Tests%2520%2528dbg%2529%2520%2528K%2520Nexus5%2529/1807&sa=D&source=hangouts&ust=1548149426180000&usg=AFQjCNGh9aBqv2wNE12D8-6rn9-AJR-cNg

Original change's description:
> Android: Add helper methods for printing native stack traces
> 
> This CL adds utility functions to unwind the stack for a given thread on
> Android ARM devices. This works on top of unwind.h and unwinds native
> (C++) stack traces only. Unwinding a thread from another thread is done
> by overriding the signal handler with a custom function and then
> interrupting the specific thread.
> 
> Bug: webrtc:10168
> Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
> Reviewed-on: https://webrtc-review.googlesource.com/c/118141
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26328}

TBR=magjed@webrtc.org,tommi@webrtc.org

Change-Id: I6e01f9226ef60777cb422baeab042bce8944f9ed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10168
Reviewed-on: https://webrtc-review.googlesource.com/c/118683
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26336}
2019-01-21 11:08:36 +00:00
Magnus Jedvert
dc32cc00e8 Android: Add helper methods for printing native stack traces
This CL adds utility functions to unwind the stack for a given thread on
Android ARM devices. This works on top of unwind.h and unwinds native
(C++) stack traces only. Unwinding a thread from another thread is done
by overriding the signal handler with a custom function and then
interrupting the specific thread.

Bug: webrtc:10168
Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
Reviewed-on: https://webrtc-review.googlesource.com/c/118141
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26328}
2019-01-20 12:01:50 +00:00