aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2022-04-21 00:28:10 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-21 00:28:10 +0000
commitb8e2096b7e98ca164d6329c8285ffdb6aab51874 (patch)
tree8d85afc49bbc59f26917e719e7a3b749c3ba1904
parenta776f81f1eae95d8d19ab2ffe73fc39adb3f8170 (diff)
parent12e0138561b2511fa39393278c7274859af521d9 (diff)
downloadperfetto-b8e2096b7e98ca164d6329c8285ffdb6aab51874.tar.gz
Merge "Add support for new unwindstack error codes." am: 623889d7db am: 12e0138561
Original change: https://android-review.googlesource.com/c/platform/external/perfetto/+/2068137 Change-Id: If2fbd6f430fd9b894b72a545bf8912802900cca1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--protos/perfetto/trace/perfetto_trace.proto3
-rw-r--r--protos/perfetto/trace/profiling/profile_packet.proto3
-rw-r--r--src/profiling/common/unwind_support.cc6
-rw-r--r--src/profiling/perf/perf_producer.cc6
-rw-r--r--src/trace_processor/importers/proto/profile_packet_utils.h6
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
}