CodeobjTableTranslator Class Reference

CodeobjTableTranslator Class Reference#

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

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

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

Inherits std::set< address_range_t >.

+ Collaboration diagram for rocprofiler::sdk::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 64 of file segment.hpp.

Member Function Documentation

◆ clear_cache()

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

Definition at line 80 of file segment.hpp.

80{ cached_segment = {}; }

Referenced by remove().

+ Here is the caller graph for this function:

◆ find_codeobj_in_range()

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

Definition at line 69 of file segment.hpp.

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

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

Referenced by rocprofiler::sdk::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::sdk::codeobj::segment::CodeobjTableTranslator::remove ( const address_range_t range)
inline

Definition at line 81 of file segment.hpp.

82 {
84 return this->erase(range) != 0;
85 }

References clear_cache().

Referenced by rocprofiler::sdk::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::sdk::codeobj::segment::CodeobjTableTranslator::remove ( uint64_t  addr)
inline

Definition at line 86 of file segment.hpp.

86{ return remove(address_range_t{addr, 0, 0}); }

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: