summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-xray
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-06-08 15:16:25 +0000
committerZachary Turner <zturner@google.com>2018-06-08 15:16:25 +0000
commit66ef5d3cd6c343f1be29c863b94156ebddbc2802 (patch)
tree85d2ac192aa1791709067906a40a014de2e3b1c2 /llvm/tools/llvm-xray
parent6edfecb88380862166c72e0ac5dbcaba6538ec58 (diff)
downloadbcm5719-llvm-66ef5d3cd6c343f1be29c863b94156ebddbc2802.tar.gz
bcm5719-llvm-66ef5d3cd6c343f1be29c863b94156ebddbc2802.zip
Clean up some code in Program.
NFC here, this just raises some platform specific ifdef hackery out of a class and creates proper platform-independent typedefs for the relevant things. This allows these typedefs to be reused in other places without having to reinvent this preprocessor logic. llvm-svn: 334294
Diffstat (limited to 'llvm/tools/llvm-xray')
-rw-r--r--llvm/tools/llvm-xray/xray-account.h8
-rw-r--r--llvm/tools/llvm-xray/xray-graph.h2
2 files changed, 4 insertions, 6 deletions
diff --git a/llvm/tools/llvm-xray/xray-account.h b/llvm/tools/llvm-xray/xray-account.h
index cc9ba897e53..5c457f17816 100644
--- a/llvm/tools/llvm-xray/xray-account.h
+++ b/llvm/tools/llvm-xray/xray-account.h
@@ -29,12 +29,11 @@ namespace xray {
class LatencyAccountant {
public:
typedef std::map<int32_t, std::vector<uint64_t>> FunctionLatencyMap;
- typedef std::map<llvm::sys::ProcessInfo::ProcessId,
- std::pair<uint64_t, uint64_t>>
+ typedef std::map<llvm::sys::procid_t, std::pair<uint64_t, uint64_t>>
PerThreadMinMaxTSCMap;
typedef std::map<uint8_t, std::pair<uint64_t, uint64_t>> PerCPUMinMaxTSCMap;
typedef std::vector<std::pair<int32_t, uint64_t>> FunctionStack;
- typedef std::map<llvm::sys::ProcessInfo::ProcessId, FunctionStack>
+ typedef std::map<llvm::sys::procid_t, FunctionStack>
PerThreadFunctionStackMap;
private:
@@ -79,8 +78,7 @@ public:
///
bool accountRecord(const XRayRecord &Record);
- const FunctionStack *
- getThreadFunctionStack(llvm::sys::ProcessInfo::ProcessId TId) const {
+ const FunctionStack *getThreadFunctionStack(llvm::sys::procid_t TId) const {
auto I = PerThreadFunctionStack.find(TId);
if (I == PerThreadFunctionStack.end())
return nullptr;
diff --git a/llvm/tools/llvm-xray/xray-graph.h b/llvm/tools/llvm-xray/xray-graph.h
index a43df265d0e..fc7f8bb470f 100644
--- a/llvm/tools/llvm-xray/xray-graph.h
+++ b/llvm/tools/llvm-xray/xray-graph.h
@@ -80,7 +80,7 @@ public:
using FunctionStack = SmallVector<FunctionAttr, 4>;
using PerThreadFunctionStackMap =
- DenseMap<llvm::sys::ProcessInfo::ProcessId, FunctionStack>;
+ DenseMap<llvm::sys::procid_t, FunctionStack>;
class GraphT : public Graph<FunctionStats, CallStats, int32_t> {
public:
OpenPOWER on IntegriCloud