[PATCH] D61946: [xray] Remove usage of procid_t
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 07:35:27 PDT 2019
aganea created this revision.
aganea added a reviewer: dberris.
Herald added a project: LLVM.
aganea marked an inline comment as done.
aganea added inline comments.
================
Comment at: tools/llvm-xray/xray-account.h:80
- const FunctionStack *getThreadFunctionStack(llvm::sys::procid_t TId) const {
- auto I = PerThreadFunctionStack.find(TId);
----------------
I also noticed this isn't used - please let me know if you want to keep it.
I'm doing some refactoring in `llvm/Support/Program.h` and I've noticed that xray uses `sys::procid_t` but doesn't really need it (a `uint32_t` thread id is always stored in that map)
Repository:
rL LLVM
https://reviews.llvm.org/D61946
Files:
tools/llvm-xray/xray-account.h
tools/llvm-xray/xray-graph.h
Index: tools/llvm-xray/xray-graph.h
===================================================================
--- tools/llvm-xray/xray-graph.h
+++ tools/llvm-xray/xray-graph.h
@@ -78,8 +78,7 @@
using FunctionStack = SmallVector<FunctionAttr, 4>;
- using PerThreadFunctionStackMap =
- DenseMap<llvm::sys::procid_t, FunctionStack>;
+ using PerThreadFunctionStackMap = DenseMap<uint32_t, FunctionStack>;
class GraphT : public Graph<FunctionStats, CallStats, int32_t> {
public:
Index: tools/llvm-xray/xray-account.h
===================================================================
--- tools/llvm-xray/xray-account.h
+++ tools/llvm-xray/xray-account.h
@@ -28,12 +28,11 @@
class LatencyAccountant {
public:
typedef std::map<int32_t, std::vector<uint64_t>> FunctionLatencyMap;
- typedef std::map<llvm::sys::procid_t, std::pair<uint64_t, uint64_t>>
+ typedef std::map<uint32_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::procid_t, FunctionStack>
- PerThreadFunctionStackMap;
+ typedef std::map<uint32_t, FunctionStack> PerThreadFunctionStackMap;
private:
PerThreadFunctionStackMap PerThreadFunctionStack;
@@ -77,13 +76,6 @@
///
bool accountRecord(const XRayRecord &Record);
- const FunctionStack *getThreadFunctionStack(llvm::sys::procid_t TId) const {
- auto I = PerThreadFunctionStack.find(TId);
- if (I == PerThreadFunctionStack.end())
- return nullptr;
- return &I->second;
- }
-
const PerThreadFunctionStackMap &getPerThreadFunctionStack() const {
return PerThreadFunctionStack;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61946.199606.patch
Type: text/x-patch
Size: 1748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190515/3e29957b/attachment.bin>
More information about the llvm-commits
mailing list