Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87ff7115 authored by Devin Moore's avatar Devin Moore Committed by Gerrit Code Review
Browse files

Merge "Add page size info to tombstone" into main

parents d6f6d0e6 4647b6b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
+7 −0
Original line number Diff line number Diff line
@@ -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());
+4 −1
Original line number Diff line number Diff line
@@ -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 {