LLVM  6.0.0svn
Public Types | Public Member Functions | Friends | List of all members
llvm::xray::InstrumentationMap Class Reference

The InstrumentationMap represents the computed function id's and indicated function addresses from an object file (or a YAML file). More...

#include "llvm/XRay/InstrumentationMap.h"

Public Types

using FunctionAddressMap = std::unordered_map< int32_t, uint64_t >
 
using FunctionAddressReverseMap = std::unordered_map< uint64_t, int32_t >
 
using SledContainer = std::vector< SledEntry >
 

Public Member Functions

const FunctionAddressMapgetFunctionAddresses ()
 Provides a raw accessor to the unordered map of function addresses. More...
 
Optional< int32_t > getFunctionId (uint64_t Addr) const
 Returns an XRay computed function id, provided a function address. More...
 
Optional< uint64_t > getFunctionAddr (int32_t FuncId) const
 Returns the function address for a function id. More...
 
const SledContainersleds () const
 Provide read-only access to the entries of the instrumentation map. More...
 

Friends

Expected< InstrumentationMaploadInstrumentationMap (StringRef)
 Loads the instrumentation map from |Filename|. More...
 

Detailed Description

The InstrumentationMap represents the computed function id's and indicated function addresses from an object file (or a YAML file).

This provides an interface to just the mapping between the function id, and the function address.

We also provide raw access to the actual instrumentation map entries we find associated with a particular object file.

Definition at line 73 of file InstrumentationMap.h.

Member Typedef Documentation

◆ FunctionAddressMap

using llvm::xray::InstrumentationMap::FunctionAddressMap = std::unordered_map<int32_t, uint64_t>

Definition at line 75 of file InstrumentationMap.h.

◆ FunctionAddressReverseMap

using llvm::xray::InstrumentationMap::FunctionAddressReverseMap = std::unordered_map<uint64_t, int32_t>

Definition at line 76 of file InstrumentationMap.h.

◆ SledContainer

Definition at line 77 of file InstrumentationMap.h.

Member Function Documentation

◆ getFunctionAddr()

Optional< uint64_t > InstrumentationMap::getFunctionAddr ( int32_t  FuncId) const

Returns the function address for a function id.

Definition at line 42 of file InstrumentationMap.cpp.

References I, and llvm::None.

◆ getFunctionAddresses()

const FunctionAddressMap& llvm::xray::InstrumentationMap::getFunctionAddresses ( )
inline

Provides a raw accessor to the unordered map of function addresses.

Definition at line 88 of file InstrumentationMap.h.

◆ getFunctionId()

Optional< int32_t > InstrumentationMap::getFunctionId ( uint64_t  Addr) const

Returns an XRay computed function id, provided a function address.

Definition at line 35 of file InstrumentationMap.cpp.

References I, and llvm::None.

◆ sleds()

const SledContainer& llvm::xray::InstrumentationMap::sleds ( ) const
inline

Provide read-only access to the entries of the instrumentation map.

Definition at line 97 of file InstrumentationMap.h.

Friends And Related Function Documentation

◆ loadInstrumentationMap

Expected<InstrumentationMap> loadInstrumentationMap ( StringRef  )
friend

Loads the instrumentation map from |Filename|.

This auto-deduces the type of the instrumentation map.


The documentation for this class was generated from the following files: