[intel pt] Add TSC timestamps

Differential Revision: https://reviews.llvm.org/D106328
This commit is contained in:
Walter Erquinigo
2021-07-16 19:16:03 -07:00
parent 6d8c63946c
commit 04195843ef
23 changed files with 591 additions and 65 deletions

View File

@@ -2024,6 +2024,10 @@ public:
m_forwards = true;
break;
}
case 't': {
m_show_tsc = true;
break;
}
default:
llvm_unreachable("Unimplemented option");
}
@@ -2035,6 +2039,7 @@ public:
m_skip = 0;
m_raw = false;
m_forwards = false;
m_show_tsc = false;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
@@ -2048,6 +2053,7 @@ public:
size_t m_skip;
bool m_raw;
bool m_forwards;
bool m_show_tsc;
};
CommandObjectTraceDumpInstructions(CommandInterpreter &interpreter)
@@ -2109,7 +2115,8 @@ protected:
int initial_index = setUpCursor();
auto dumper = std::make_unique<TraceInstructionDumper>(
std::move(cursor_up), initial_index, m_options.m_raw);
std::move(cursor_up), initial_index, m_options.m_raw,
m_options.m_show_tsc);
// This happens when the seek value was more than the number of available
// instructions.