Merge "Add page size info to tombstone" into main

This commit is contained in:
Devin Moore 2024-05-07 19:55:51 +00:00 committed by Gerrit Code Review
commit 87ff7115ef
3 changed files with 14 additions and 1 deletions

View file

@ -714,6 +714,9 @@ void engrave_tombstone_proto(Tombstone* tombstone, unwindstack::AndroidUnwinder*
error.c_str());
}
result.set_page_size(getpagesize());
result.set_has_been_16kb_mode(android::base::GetBoolProperty("ro.misctrl.16kb_before", false));
auto cmd_line = result.mutable_command_line();
for (const auto& arg : target_thread.command_line) {
*cmd_line->Add() = arg;

View file

@ -586,6 +586,13 @@ bool tombstone_proto_to_text(const Tombstone& tombstone, CallbackType callback)
CBL("Timestamp: %s", tombstone.timestamp().c_str());
CBL("Process uptime: %ds", tombstone.process_uptime());
// only print this info if the page size is not 4k or has been in 16k mode
if (tombstone.page_size() != 4096) {
CBL("Page size: %d bytes", tombstone.page_size());
} else if (tombstone.has_been_16kb_mode()) {
CBL("Has been in 16kb mode: yes");
}
// Process header
const auto& threads = tombstone.threads();
auto main_thread_it = threads.find(tombstone.tid());

View file

@ -46,7 +46,10 @@ message Tombstone {
repeated LogBuffer log_buffers = 18;
repeated FD open_fds = 19;
reserved 22 to 999;
uint32 page_size = 22;
bool has_been_16kb_mode = 23;
reserved 24 to 999;
}
enum Architecture {