diff options
author | Christopher Ferris <cferris@google.com> | 2022-04-21 00:09:31 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-04-21 00:09:31 +0000 |
commit | 12e0138561b2511fa39393278c7274859af521d9 (patch) | |
tree | 8d85afc49bbc59f26917e719e7a3b749c3ba1904 | |
parent | 8aae922cb9939ede6b534de7335a0228e26dd5e4 (diff) | |
parent | 623889d7dbd7e7f91d937e3411d3a65b606afe92 (diff) | |
download | perfetto-12e0138561b2511fa39393278c7274859af521d9.tar.gz |
Merge "Add support for new unwindstack error codes." am: 623889d7db
Original change: https://android-review.googlesource.com/c/platform/external/perfetto/+/2068137
Change-Id: I17b61837cdfa81cd3ded49a604bf9441ab882180
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | protos/perfetto/trace/perfetto_trace.proto | 3 | ||||
-rw-r--r-- | protos/perfetto/trace/profiling/profile_packet.proto | 3 | ||||
-rw-r--r-- | src/profiling/common/unwind_support.cc | 6 | ||||
-rw-r--r-- | src/profiling/perf/perf_producer.cc | 6 | ||||
-rw-r--r-- | src/trace_processor/importers/proto/profile_packet_utils.h | 6 |
5 files changed, 24 insertions, 0 deletions
diff --git a/protos/perfetto/trace/perfetto_trace.proto b/protos/perfetto/trace/perfetto_trace.proto index fb26bbc9b..63b058f13 100644 --- a/protos/perfetto/trace/perfetto_trace.proto +++ b/protos/perfetto/trace/perfetto_trace.proto @@ -9097,6 +9097,9 @@ message Profiling { UNWIND_ERROR_SYSTEM_CALL = 9; UNWIND_ERROR_THREAD_TIMEOUT = 10; UNWIND_ERROR_THREAD_DOES_NOT_EXIST = 11; + UNWIND_ERROR_BAD_ARCH = 12; + UNWIND_ERROR_MAPS_PARSE = 13; + UNWIND_ERROR_INVALID_PARAMETER = 14; } } diff --git a/protos/perfetto/trace/profiling/profile_packet.proto b/protos/perfetto/trace/profiling/profile_packet.proto index f599f174f..d58e6e72d 100644 --- a/protos/perfetto/trace/profiling/profile_packet.proto +++ b/protos/perfetto/trace/profiling/profile_packet.proto @@ -271,6 +271,9 @@ message Profiling { UNWIND_ERROR_SYSTEM_CALL = 9; UNWIND_ERROR_THREAD_TIMEOUT = 10; UNWIND_ERROR_THREAD_DOES_NOT_EXIST = 11; + UNWIND_ERROR_BAD_ARCH = 12; + UNWIND_ERROR_MAPS_PARSE = 13; + UNWIND_ERROR_INVALID_PARAMETER = 14; } } diff --git a/src/profiling/common/unwind_support.cc b/src/profiling/common/unwind_support.cc index 48ff5cf2d..a070ee20e 100644 --- a/src/profiling/common/unwind_support.cc +++ b/src/profiling/common/unwind_support.cc @@ -161,6 +161,12 @@ std::string StringifyLibUnwindstackError(unwindstack::ErrorCode e) { return "THREAD_DOES_NOT_EXIST"; case unwindstack::ERROR_THREAD_TIMEOUT: return "THREAD_TIMEOUT"; + case unwindstack::ERROR_BAD_ARCH: + return "BAD_ARCH"; + case unwindstack::ERROR_MAPS_PARSE: + return "MAPS_PARSE"; + case unwindstack::ERROR_INVALID_PARAMETER: + return "INVALID_PARAMETER"; } } diff --git a/src/profiling/perf/perf_producer.cc b/src/profiling/perf/perf_producer.cc index 22c4a6d5c..858288507 100644 --- a/src/profiling/perf/perf_producer.cc +++ b/src/profiling/perf/perf_producer.cc @@ -284,6 +284,12 @@ protos::pbzero::Profiling::StackUnwindError ToProtoEnum( return Profiling::UNWIND_ERROR_THREAD_TIMEOUT; case unwindstack::ERROR_THREAD_DOES_NOT_EXIST: return Profiling::UNWIND_ERROR_THREAD_DOES_NOT_EXIST; + case unwindstack::ERROR_BAD_ARCH: + return Profiling::UNWIND_ERROR_BAD_ARCH; + case unwindstack::ERROR_MAPS_PARSE: + return Profiling::UNWIND_ERROR_MAPS_PARSE; + case unwindstack::ERROR_INVALID_PARAMETER: + return Profiling::UNWIND_ERROR_INVALID_PARAMETER; } return Profiling::UNWIND_ERROR_UNKNOWN; } diff --git a/src/trace_processor/importers/proto/profile_packet_utils.h b/src/trace_processor/importers/proto/profile_packet_utils.h index 2dde3889f..08c8a46d5 100644 --- a/src/trace_processor/importers/proto/profile_packet_utils.h +++ b/src/trace_processor/importers/proto/profile_packet_utils.h @@ -113,6 +113,12 @@ class ProfilePacketUtils { return "thread_timeout"; case Profiling::UNWIND_ERROR_THREAD_DOES_NOT_EXIST: return "thread_does_not_exist"; + case Profiling::UNWIND_ERROR_BAD_ARCH: + return "bad_arch"; + case Profiling::UNWIND_ERROR_MAPS_PARSE: + return "maps_parse"; + case Profiling::UNWIND_ERROR_INVALID_PARAMETER: + return "invalid_parameter"; } return "unknown"; // switch should be complete, but gcc needs a hint } |