|
LLVM 22.0.0git
|
Profile instances are thread-compatible. More...
#include "llvm/XRay/Profile.h"
Classes | |
| struct | Block |
| struct | Data |
Public Types | |
| using | ThreadID = uint64_t |
| using | PathID = unsigned |
| using | FuncID = int32_t |
| using | const_iterator = BlockList::const_iterator |
Public Member Functions | |
| LLVM_ABI Expected< std::vector< FuncID > > | expandPath (PathID P) const |
| Provides a sequence of function IDs from a previously interned PathID. | |
| LLVM_ABI PathID | internPath (ArrayRef< FuncID > P) |
| The stack represented in |P| must be in stack order (leaf to root). | |
| LLVM_ABI Error | addBlock (Block &&B) |
| Appends a fully-formed Block instance into the Profile. | |
| Profile ()=default | |
| ~Profile ()=default | |
| Profile (Profile &&O) noexcept | |
| Profile & | operator= (Profile &&O) noexcept |
| LLVM_ABI | Profile (const Profile &) |
| LLVM_ABI Profile & | operator= (const Profile &) |
| const_iterator | begin () const |
| const_iterator | end () const |
| bool | empty () const |
Friends | |
| void | swap (Profile &L, Profile &R) |
| using llvm::xray::Profile::const_iterator = BlockList::const_iterator |
| using llvm::xray::Profile::FuncID = int32_t |
| using llvm::xray::Profile::PathID = unsigned |
|
default |
Referenced by operator=(), operator=(), Profile(), Profile(), and swap.
|
default |
|
inlinenoexcept |
Definition at line 24 of file Profile.cpp.
References B(), llvm::cantFail(), internPath(), llvm::xray::Profile::Block::PathData, Profile(), and llvm::xray::Profile::Block::Thread.
Appends a fully-formed Block instance into the Profile.
Returns an error condition in the following cases:
Definition at line 119 of file Profile.cpp.
References B(), llvm::make_error(), and llvm::Error::success().
Referenced by llvm::xray::mergeProfilesByStack(), and llvm::xray::mergeProfilesByThread().
|
inline |
|
inline |
| Expected< std::vector< Profile::FuncID > > Profile::expandPath | ( | PathID | P | ) | const |
Provides a sequence of function IDs from a previously interned PathID.
Returns an error if |P| had not been interned before into the Profile.
Definition at line 129 of file Profile.cpp.
References llvm::make_error(), and P.
| Profile::PathID Profile::internPath | ( | ArrayRef< FuncID > | P | ) |
The stack represented in |P| must be in stack order (leaf to root).
This will always return the same PathID for |P| that has the same sequence.
Definition at line 141 of file Profile.cpp.
References assert(), llvm::find_if(), N, P, and llvm::reverse().
Referenced by llvm::xray::mergeProfilesByStack(), llvm::xray::mergeProfilesByThread(), and Profile().
Definition at line 36 of file Profile.cpp.