LLVM  5.0.0
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:
[legend]

Public Member Functions

void HandleInit (uint32_t *Start, uint32_t *Stop)
 
void HandleInline8bitCountersInit (uint8_t *Start, 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)
 
template<class Callback >
void CollectFeatures (Callback CB) const
 
void ResetMaps ()
 
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)
 
void PrintNewPCs ()
 
void InitializePrintNewPCs ()
 
size_t GetNumPCs () const
 
uintptr_t GetPC (size_t Idx)
 
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
 

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

ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::AddValueForMemcmp ( void *  caller_pc,
const void *  s1,
const void *  s2,
size_t  n,
bool  StopAtZero 
)
template<class Callback >
void fuzzer::TracePC::CollectFeatures ( Callback  CB) const
void fuzzer::TracePC::DumpCoverage ( )
size_t fuzzer::TracePC::GetNumPCs ( ) const
inline
uintptr_t fuzzer::TracePC::GetPC ( size_t  Idx)
inline

Definition at line 113 of file FuzzerTracePC.h.

References assert(), and GetNumPCs().

size_t fuzzer::TracePC::GetTotalPCCoverage ( )

Definition at line 50 of file FuzzerTracePC.cpp.

References GetNumPCs(), and fuzzer::N.

ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::HandleCallerCallee ( uintptr_t  Caller,
uintptr_t  Callee 
)
template<class T >
void fuzzer::TracePC::HandleCmp ( uintptr_t  PC,
T  Arg1,
T  Arg2 
)
template<class T >
ATTRIBUTE_TARGET_POPCNT ALWAYS_INLINE ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::HandleCmp ( uintptr_t  PC,
T  Arg1,
T  Arg2 
)
void fuzzer::TracePC::HandleInit ( uint32_t *  Start,
uint32_t *  Stop 
)

Definition at line 69 of file FuzzerTracePC.cpp.

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

Referenced by __sanitizer_cov_trace_pc_guard_init().

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

Definition at line 59 of file FuzzerTracePC.cpp.

References assert(), and Start.

Referenced by __sanitizer_cov_8bit_counters_init().

void fuzzer::TracePC::InitializePrintNewPCs ( )

Definition at line 109 of file FuzzerTracePC.cpp.

References assert(), and GetNumPCs().

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

void fuzzer::TracePC::PrintCoverage ( )
void fuzzer::TracePC::PrintFeatureSet ( )
void fuzzer::TracePC::PrintModuleInfo ( )

Definition at line 87 of file FuzzerTracePC.cpp.

References fuzzer::Printf(), Start, and Stop.

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

void fuzzer::TracePC::PrintNewPCs ( )

Definition at line 118 of file FuzzerTracePC.cpp.

References assert(), GetNumPCs(), and fuzzer::PrintPC().

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

Definition at line 83 of file FuzzerTracePC.h.

References P.

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

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

Definition at line 81 of file FuzzerTracePC.h.

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

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

Definition at line 82 of file FuzzerTracePC.h.

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

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

Member Data Documentation

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

Definition at line 72 of file FuzzerTracePC.h.

Referenced by GetNumPCs(), and HandleInit().

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

Definition at line 74 of file FuzzerTracePC.h.

Referenced by __sanitizer_cov_trace_pc(), and GetNumPCs().

MemMemTable<1024> fuzzer::TracePC::MMT
uint8_t* fuzzer::TracePC::Start

Definition at line 131 of file FuzzerTracePC.h.

Referenced by HandleInit(), HandleInline8bitCountersInit(), and PrintModuleInfo().

uint8_t * fuzzer::TracePC::Stop

Definition at line 131 of file FuzzerTracePC.h.

Referenced by HandleInit(), and PrintModuleInfo().

TableOfRecentCompares<uint32_t, 32> fuzzer::TracePC::TORC4
TableOfRecentCompares<uint64_t, 32> fuzzer::TracePC::TORC8
TableOfRecentCompares<Word, 32> fuzzer::TracePC::TORCW

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