btftoolchain
btf::BtfEntry Class Reference

Class for a BtfEntry. More...

#include <btf.h>

Collaboration diagram for btf::BtfEntry:
[legend]

Classes

union  Events
 Union Class for all supported Events. More...
 

Public Member Functions

std::string toString (std::unordered_map< size_t, std::string > &hash_map) const
 Converts a BtfEntry into string. More...
 
std::string eventToString () const
 Converts union Events into string according to the type_ of the BtfEntry. More...
 

Public Attributes

uint64_t time_ {0}
 Timestamp of the BtfEntry. More...
 
EntityTypes type_ {EntityTypes::unknown}
 Entity type of the BtfEntry. The default value is "unknown". More...
 
size_t source_hash_ {0}
 Unique hash value of the source. More...
 
uint64_t source_instance_ {0}
 Source instance that triggered the event. More...
 
size_t target_hash_ {0}
 Unique hash value of the target. More...
 
uint64_t target_instance_ {0}
 Target instance of the event. More...
 
Events event_
 Events type of the BtfEntry. More...
 
std::string note_
 Comments added to the BtfEntry. More...
 

Detailed Description

Class for a BtfEntry.

A BtfEntry object is equivalent to a line in a BTF file.

Member Function Documentation

◆ eventToString()

std::string btf::BtfEntry::eventToString ( ) const

Converts union Events into string according to the type_ of the BtfEntry.

Returns
String if type_ and Events type are valid, else a fatal error is triggered.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

std::string btf::BtfEntry::toString ( std::unordered_map< size_t, std::string > &  hash_map) const

Converts a BtfEntry into string.

Parameters
[in]hash_mapUnordered map which contains all hash values of the current BtfEntry.
Returns
String if type_ and Events type are valid, else a fatal error is triggered.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ event_

Events btf::BtfEntry::event_

Events type of the BtfEntry.

◆ note_

std::string btf::BtfEntry::note_

Comments added to the BtfEntry.

◆ source_hash_

size_t btf::BtfEntry::source_hash_ {0}

Unique hash value of the source.

◆ source_instance_

uint64_t btf::BtfEntry::source_instance_ {0}

Source instance that triggered the event.

◆ target_hash_

size_t btf::BtfEntry::target_hash_ {0}

Unique hash value of the target.

◆ target_instance_

uint64_t btf::BtfEntry::target_instance_ {0}

Target instance of the event.

◆ time_

uint64_t btf::BtfEntry::time_ {0}

Timestamp of the BtfEntry.

◆ type_

EntityTypes btf::BtfEntry::type_ {EntityTypes::unknown}

Entity type of the BtfEntry. The default value is "unknown".


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