if (symbol == nullptr) {
if (show_ip_for_unknown_symbol_) {
std::string name = android::base::StringPrintf(
- "%s[+%" PRIx64 "]", dso->FileName().c_str(), vaddr_in_file);
+ "%s%s[+%" PRIx64 "]",
+ (show_mark_for_unknown_symbol_ ? "*" : ""),
+ dso->FileName().c_str(), vaddr_in_file);
dso->InsertSymbol(Symbol(name, vaddr_in_file, 1));
symbol = dso->FindSymbol(vaddr_in_file);
CHECK(symbol != nullptr);
public:
ThreadTree()
: show_ip_for_unknown_symbol_(false),
+ show_mark_for_unknown_symbol_(false),
unknown_symbol_("unknown", 0,
std::numeric_limits<unsigned long long>::max()) {
unknown_dso_ = Dso::CreateDso(DSO_ELF_FILE, "unknown");
const Symbol* UnknownSymbol() const { return &unknown_symbol_; }
void ShowIpForUnknownSymbol() { show_ip_for_unknown_symbol_ = true; }
+ void ShowMarkForUnknownSymbol() {
+ show_mark_for_unknown_symbol_ = true;
+ unknown_symbol_ = Symbol("*unknown", 0, ULLONG_MAX);
+ }
// Clear thread and map information, but keep loaded dso information. It saves
// the time to reload dso information.
void ClearThreadAndMap();
std::unordered_map<std::string, std::unique_ptr<Dso>> user_dso_tree_;
std::unique_ptr<Dso> unknown_dso_;
bool show_ip_for_unknown_symbol_;
+ bool show_mark_for_unknown_symbol_;
Symbol unknown_symbol_;
std::unordered_map<uint64_t, Dso*> dso_id_to_dso_map_;
};