LLVM  6.0.0svn
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
fuzzer::TracePC Class Reference

#include "Fuzzer/FuzzerTracePC.h"

Collaboration diagram for fuzzer::TracePC:
Collaboration graph
[legend]

Public Member Functions

void HandleInit (uint32_t *Start, uint32_t *Stop)
 
void HandleInline8bitCountersInit (uint8_t *Start, uint8_t *Stop)
 
void HandlePCsInit (const uint8_t *Start, const uint8_t *Stop)
 
void HandleCallerCallee (uintptr_t Caller, uintptr_t Callee)
 
template<class T >
void HandleCmp (uintptr_t PC, T Arg1, T Arg2)
 
size_t GetTotalPCCoverage ()
 
void SetUseCounters (bool UC)
 
void SetUseValueProfile (bool VP)
 
void SetPrintNewPCs (bool P)
 
void UpdateObservedPCs ()
 
template<class Callback >
void CollectFeatures (Callback CB) const
 
void ResetMaps ()
 
void ClearInlineCounters ()
 
void UpdateFeatureSet (size_t CurrentElementIdx, size_t CurrentElementSize)
 
void PrintFeatureSet ()
 
void PrintModuleInfo ()
 
void PrintCoverage ()
 
void DumpCoverage ()
 
void AddValueForMemcmp (void *caller_pc, const void *s1, const void *s2, size_t n, bool StopAtZero)
 
size_t GetNumPCs () const
 
uintptr_t GetPC (size_t Idx)
 
void RecordInitialStack ()
 
uintptr_t GetMaxStackOffset () const
 
template<class CallBack >
void ForEachObservedPC (CallBack CB)
 
template<class T >
ATTRIBUTE_TARGET_POPCNT ALWAYS_INLINE ATTRIBUTE_NO_SANITIZE_ALL void HandleCmp (uintptr_t PC, T Arg1, T Arg2)
 

Public Attributes

TableOfRecentCompares< uint32_t, 32 > TORC4
 
TableOfRecentCompares< uint64_t, 32 > TORC8
 
TableOfRecentCompares< Word, 32 > TORCW
 
MemMemTable< 1024 > MMT
 
uint8_t * Start
 
uint8_t * Stop
 
const uintptr_t * Start
 
const uintptr_t * Stop
 

Static Public Attributes

static const size_t kNumPCs = 1 << 21
 
static const size_t kTracePcBits = 18
 

Detailed Description

Definition at line 70 of file FuzzerTracePC.h.

Member Function Documentation

◆ AddValueForMemcmp()

ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::AddValueForMemcmp ( void *  caller_pc,
const void *  s1,
const void *  s2,
size_t  n,
bool  StopAtZero 
)

◆ ClearInlineCounters()

void fuzzer::TracePC::ClearInlineCounters ( )

Definition at line 338 of file FuzzerTracePC.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size.

◆ CollectFeatures()

template<class Callback >
void fuzzer::TracePC::CollectFeatures ( Callback  CB) const

◆ DumpCoverage()

void fuzzer::TracePC::DumpCoverage ( )

◆ ForEachObservedPC()

template<class CallBack >
void fuzzer::TracePC::ForEachObservedPC ( CallBack  CB)
inline

Definition at line 127 of file FuzzerTracePC.h.

Referenced by fuzzer::Fuzzer::SetMaxMutationLen().

◆ GetMaxStackOffset()

uintptr_t fuzzer::TracePC::GetMaxStackOffset ( ) const

◆ GetNumPCs()

size_t fuzzer::TracePC::GetNumPCs ( ) const
inline

Definition at line 115 of file FuzzerTracePC.h.

References fuzzer::Min().

Referenced by DumpCoverage(), and GetTotalPCCoverage().

◆ GetPC()

uintptr_t fuzzer::TracePC::GetPC ( size_t  Idx)
inline

Definition at line 118 of file FuzzerTracePC.h.

References assert().

◆ GetTotalPCCoverage()

size_t fuzzer::TracePC::GetTotalPCCoverage ( )

Definition at line 51 of file FuzzerTracePC.cpp.

References GetNumPCs(), and N.

Referenced by fuzzer::Fuzzer::RssLimitCallback().

◆ HandleCallerCallee()

ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::HandleCallerCallee ( uintptr_t  Caller,
uintptr_t  Callee 
)

◆ HandleCmp() [1/2]

template<class T >
void fuzzer::TracePC::HandleCmp ( uintptr_t  PC,
T  Arg1,
T  Arg2 
)

◆ HandleCmp() [2/2]

template<class T >
ATTRIBUTE_TARGET_POPCNT ALWAYS_INLINE ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::HandleCmp ( uintptr_t  PC,
T  Arg1,
T  Arg2 
)

◆ HandleInit()

void fuzzer::TracePC::HandleInit ( uint32_t Start,
uint32_t Stop 
)

Definition at line 81 of file FuzzerTracePC.cpp.

References assert(), kNumPCs, P, fuzzer::RawPrint(), Start, and Stop.

Referenced by __sanitizer_cov_trace_pc_guard_init().

◆ HandleInline8bitCountersInit()

void fuzzer::TracePC::HandleInline8bitCountersInit ( uint8_t *  Start,
uint8_t *  Stop 
)

Definition at line 62 of file FuzzerTracePC.cpp.

References assert(), and Start.

Referenced by __sanitizer_cov_8bit_counters_init().

◆ HandlePCsInit()

void fuzzer::TracePC::HandlePCsInit ( const uint8_t *  Start,
const uint8_t *  Stop 
)

Definition at line 72 of file FuzzerTracePC.cpp.

References assert(), B, E, Start, and Stop.

Referenced by __sanitizer_cov_pcs_init().

◆ PrintCoverage()

void fuzzer::TracePC::PrintCoverage ( )

◆ PrintFeatureSet()

void fuzzer::TracePC::PrintFeatureSet ( )

◆ PrintModuleInfo()

void fuzzer::TracePC::PrintModuleInfo ( )

◆ RecordInitialStack()

void fuzzer::TracePC::RecordInitialStack ( )

Definition at line 346 of file FuzzerTracePC.cpp.

References __sancov_lowest_stack.

Referenced by fuzzer::Fuzzer::ExecuteCallback().

◆ ResetMaps()

void fuzzer::TracePC::ResetMaps ( )
inline

◆ SetPrintNewPCs()

void fuzzer::TracePC::SetPrintNewPCs ( bool  P)
inline

Definition at line 84 of file FuzzerTracePC.h.

References P.

Referenced by fuzzer::Fuzzer::Loop().

◆ SetUseCounters()

void fuzzer::TracePC::SetUseCounters ( bool  UC)
inline

Definition at line 82 of file FuzzerTracePC.h.

Referenced by fuzzer::Fuzzer::Fuzzer().

◆ SetUseValueProfile()

void fuzzer::TracePC::SetUseValueProfile ( bool  VP)
inline

Definition at line 83 of file FuzzerTracePC.h.

Referenced by fuzzer::Fuzzer::Fuzzer().

◆ UpdateFeatureSet()

void fuzzer::TracePC::UpdateFeatureSet ( size_t  CurrentElementIdx,
size_t  CurrentElementSize 
)

◆ UpdateObservedPCs()

void fuzzer::TracePC::UpdateObservedPCs ( )

Member Data Documentation

◆ kNumPCs

const size_t fuzzer::TracePC::kNumPCs = 1 << 21
static

Definition at line 72 of file FuzzerTracePC.h.

Referenced by HandleInit().

◆ kTracePcBits

const size_t fuzzer::TracePC::kTracePcBits = 18
static

Definition at line 74 of file FuzzerTracePC.h.

Referenced by __sanitizer_cov_trace_pc().

◆ MMT

MemMemTable<1024> fuzzer::TracePC::MMT

◆ Start [1/2]

uint8_t* fuzzer::TracePC::Start

◆ Start [2/2]

const uintptr_t* fuzzer::TracePC::Start

Definition at line 149 of file FuzzerTracePC.h.

◆ Stop [1/2]

uint8_t * fuzzer::TracePC::Stop

Definition at line 145 of file FuzzerTracePC.h.

Referenced by HandleInit(), HandlePCsInit(), PrintModuleInfo(), and UpdateObservedPCs().

◆ Stop [2/2]

const uintptr_t * fuzzer::TracePC::Stop

Definition at line 149 of file FuzzerTracePC.h.

◆ TORC4

TableOfRecentCompares<uint32_t, 32> fuzzer::TracePC::TORC4

◆ TORC8

TableOfRecentCompares<uint64_t, 32> fuzzer::TracePC::TORC8

◆ TORCW

TableOfRecentCompares<Word, 32> fuzzer::TracePC::TORCW

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