CodeobjTableTranslator Class Reference

CodeobjTableTranslator Class Reference#

Rocprofiler SDK Developer API: rocprofiler::codeobj::segment::CodeobjTableTranslator Class Reference
Rocprofiler SDK Developer API 0.4.0
ROCm Profiling API and tools
rocprofiler::codeobj::segment::CodeobjTableTranslator Class Reference

Finds a candidate codeobj for the given vaddr. More...

#include "rocprofiler-sdk/amd_detail/rocprofiler-sdk-codeobj/segment.hpp"

Inherits std::set< address_range_t >.

+ Collaboration diagram for rocprofiler::codeobj::segment::CodeobjTableTranslator:

Public Member Functions

address_range_t find_codeobj_in_range (uint64_t addr)
 
void clear_cache ()
 
bool remove (const address_range_t &range)
 
bool remove (uint64_t addr)
 

Detailed Description

Finds a candidate codeobj for the given vaddr.

Definition at line 62 of file segment.hpp.

Member Function Documentation

◆ clear_cache()

void rocprofiler::codeobj::segment::CodeobjTableTranslator::clear_cache ( )
inline

Definition at line 78 of file segment.hpp.

78{ cached_segment = {}; }

Referenced by remove().

+ Here is the caller graph for this function:

◆ find_codeobj_in_range()

address_range_t rocprofiler::codeobj::segment::CodeobjTableTranslator::find_codeobj_in_range ( uint64_t  addr)
inline

Definition at line 67 of file segment.hpp.

68 {
69 if(!cached_segment.inrange(addr))
70 {
71 auto it = this->find(address_range_t{addr, 0, 0});
72 if(it == this->end()) throw std::exception();
73 cached_segment = *it;
74 }
75 return cached_segment;
76 }

References rocprofiler::codeobj::segment::address_range_t::inrange().

Referenced by rocprofiler::codeobj::disassembly::CodeobjAddressTranslate::get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove() [1/2]

bool rocprofiler::codeobj::segment::CodeobjTableTranslator::remove ( const address_range_t range)
inline

Definition at line 79 of file segment.hpp.

80 {
82 return this->erase(range) != 0;
83 }

References clear_cache().

Referenced by rocprofiler::codeobj::disassembly::CodeobjAddressTranslate::removeDecoder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove() [2/2]

bool rocprofiler::codeobj::segment::CodeobjTableTranslator::remove ( uint64_t  addr)
inline

Definition at line 84 of file segment.hpp.

84{ return remove(address_range_t{addr, 0, 0}); }
bool remove(const address_range_t &range)
Definition segment.hpp:79

References remove().

Referenced by remove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • rocprofiler-sdk/amd_detail/rocprofiler-sdk-codeobj/segment.hpp