diff options
author | Christopher Ferris <cferris@google.com> | 2022-04-20 23:49:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-04-20 23:49:07 +0000 |
commit | 623889d7dbd7e7f91d937e3411d3a65b606afe92 (patch) | |
tree | 8d85afc49bbc59f26917e719e7a3b749c3ba1904 | |
parent | 3a7d61d68c588c054e92b595cfd555c24623d46e (diff) | |
parent | a2266839f47a7273bef9a6f7544280822c49e0e6 (diff) | |
download | perfetto-623889d7dbd7e7f91d937e3411d3a65b606afe92.tar.gz |
Merge "Add support for new unwindstack error codes."
-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 } |