Classes | Typedefs | Enumerations | Functions | Variables
absl::base_internal Namespace Reference

Classes

class  AtomicHook
 
class  AtomicHook< ReturnType(*)(Args...)>
 
struct  Callable
 
class  CycleClock
 
class  CycleClockSource
 
struct  DataMemAndPtr
 
struct  DataMemAndRef
 
struct  Invoker
 
class  LowLevelAlloc
 
struct  MemFunAndPtr
 
struct  MemFunAndRef
 
struct  PerThreadSynch
 
class  SchedulingGuard
 
class  SchedulingHelper
 
class  ScopedSetEnv
 
class  SpinLock
 
class  SpinLockHolder
 
struct  SpinLockTest
 
struct  SpinLockWaitTransition
 
struct  StrippedAccept
 
struct  ThreadIdentity
 

Typedefs

using CycleClockSourceFunc) = int64_t(*)(
 
template<typename F , typename... Args>
using InvokeT = decltype(Invoker< F, Args... >::type::Invoke(std::declval< F >(), std::declval< Args >()...))
 
using ThreadIdentityReclaimerFunction = void(*)(void *)
 

Enumerations

enum  { kOnceInit = 0, kOnceRunning = 0x65C2937B, kOnceWaiter = 0x05A308D2, kOnceDone = 221 }
 
enum  { PROFILE_TIMESTAMP_SHIFT = 7 }
 
enum  { LOCKWORD_RESERVED_SHIFT = 3 }
 
enum  LinkerInitialized { kLinkerInitialized = 0 }
 
enum  SchedulingMode { SCHEDULE_KERNEL_ONLY = 0, SCHEDULE_COOPERATIVE_AND_KERNEL }
 

Functions

static void AddToFreelist (void *v, LowLevelAlloc::Arena *arena)
 
template<typename Callable , typename... Args>
void CallOnceImpl (std::atomic< uint32_t > *control, base_internal::SchedulingMode scheduling_mode, Callable &&fn, Args &&...args)
 
static uintptr_t CheckedAdd (uintptr_t a, uintptr_t b)
 
void ClearCurrentThreadIdentity ()
 
static void Coalesce (AllocList *a)
 
std::atomic< uint32_t > * ControlWord (absl::once_flag *flag)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountLeadingZeros32 (uint32_t n)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountLeadingZeros32Slow (uint64_t n)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountLeadingZeros64 (uint64_t n)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountLeadingZeros64Slow (uint64_t n)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountTrailingZerosNonZero32 (uint32_t n)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountTrailingZerosNonZero32Slow (uint32_t n)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountTrailingZerosNonZero64 (uint64_t n)
 
ABSL_BASE_INTERNAL_FORCEINLINE int CountTrailingZerosNonZero64Slow (uint64_t n)
 
ThreadIdentityCurrentThreadIdentityIfPresent ()
 
static void * DoAllocWithArena (size_t request, LowLevelAlloc::Arena *arena)
 
static void FreeTID (void *v)
 
static double GetNominalCPUFrequency ()
 
static int GetNumCPUs ()
 
pid_t GetTID ()
 
static std::vector< uint32_t > *tid_array GUARDED_BY (tid_lock)
 
constexpr uintptr_t HideMask ()
 
template<class T >
uintptr_t HidePtr (T *ptr)
 
static void InitGetTID ()
 
static void InitializeSystemInfo ()
 
static int IntLog2 (size_t size, size_t base)
 
template<typename F , typename... Args>
InvokeT< F, Args... > Invoke (F &&f, Args &&...args)
 
static void LLA_SkiplistDelete (AllocList *head, AllocList *e, AllocList **prev)
 
static void LLA_SkiplistInsert (AllocList *head, AllocList *e, AllocList **prev)
 
static int LLA_SkiplistLevels (size_t size, size_t base, uint32_t *random)
 
static AllocList * LLA_SkiplistSearch (AllocList *head, AllocList *e, AllocList **prev)
 
template<typename Callable , typename... Args>
void LowLevelCallOnce (absl::once_flag *flag, Callable &&fn, Args &&...args)
 
static uintptr_t Magic (uintptr_t magic, AllocList::Header *ptr)
 
static AllocList * Next (int i, AllocList *prev, LowLevelAlloc::Arena *arena)
 
double NominalCPUFrequency ()
 
int NumCPUs ()
 
static int Random (uint32_t *state)
 
static bool ReadLongFromFile (const char *file, long *value)
 
void RegisterSpinLockProfiler (void(*fn)(const void *contendedlock, int64_t wait_cycles))
 
void RegisterSpinLockProfiler (void(*fn)(const void *lock, int64_t wait_cycles))
 
static uintptr_t RoundUp (uintptr_t addr, uintptr_t align)
 
void SetCurrentThreadIdentity (ThreadIdentity *identity, ThreadIdentityReclaimerFunction reclaimer)
 
void SpinLockDelay (std::atomic< uint32_t > *w, uint32_t value, int loop, base_internal::SchedulingMode scheduling_mode)
 
int SpinLockSuggestedDelayNS (int loop)
 
uint32_t SpinLockWait (std::atomic< uint32_t > *w, int n, const SpinLockWaitTransition trans[], base_internal::SchedulingMode scheduling_mode)
 
void SpinLockWake (std::atomic< uint32_t > *w, bool all)
 
void ThrowStdBadAlloc ()
 
void ThrowStdBadFunctionCall ()
 
void ThrowStdDomainError (const std::string &what_arg)
 
void ThrowStdDomainError (const char *what_arg)
 
void ThrowStdInvalidArgument (const std::string &what_arg)
 
void ThrowStdInvalidArgument (const char *what_arg)
 
void ThrowStdLengthError (const std::string &what_arg)
 
void ThrowStdLengthError (const char *what_arg)
 
void ThrowStdLogicError (const std::string &what_arg)
 
void ThrowStdLogicError (const char *what_arg)
 
void ThrowStdOutOfRange (const std::string &what_arg)
 
void ThrowStdOutOfRange (const char *what_arg)
 
void ThrowStdOverflowError (const std::string &what_arg)
 
void ThrowStdOverflowError (const char *what_arg)
 
void ThrowStdRangeError (const std::string &what_arg)
 
void ThrowStdRangeError (const char *what_arg)
 
void ThrowStdRuntimeError (const std::string &what_arg)
 
void ThrowStdRuntimeError (const char *what_arg)
 
void ThrowStdUnderflowError (const std::string &what_arg)
 
void ThrowStdUnderflowError (const char *what_arg)
 
template<class T >
T * UnhidePtr (uintptr_t hidden)
 

Variables

static std::atomic< uint64_t > delay_rand
 
static once_flag init_system_info_once
 
static constexpr int kBitsPerWord = 32
 
static const uintptr_t kMagicAllocated = 0x4c833e95U
 
static const uintptr_t kMagicUnallocated = ~kMagicAllocated
 
static const int kMaxLevel = 30
 
static double nominal_cpu_frequency = 1.0
 
static int num_cpus = 0
 
static ABSL_CONST_INIT base_internal::AtomicHook< void(*)(const void *lock, int64_t wait_cycles)> submit_profile_data
 
ABSL_PER_THREAD_TLS_KEYWORD ThreadIdentitythread_identity_ptr
 
static pthread_key_t tid_key
 
static absl::base_internal::SpinLock tid_lock (absl::base_internal::kLinkerInitialized)
 
static once_flag tid_once
 

Typedef Documentation

using absl::base_internal::CycleClockSourceFunc = typedef int64_t (*)(

Definition at line 73 of file cycleclock.h.

template<typename F , typename... Args>
using absl::base_internal::InvokeT = typedef decltype(Invoker<F, Args...>::type::Invoke( std::declval<F>(), std::declval<Args>()...))

Definition at line 176 of file invoke.h.

Definition at line 174 of file thread_identity.h.

Enumeration Type Documentation

anonymous enum
Enumerator
kOnceInit 
kOnceRunning 
kOnceWaiter 
kOnceDone 

Definition at line 134 of file call_once.h.

anonymous enum
Enumerator
PROFILE_TIMESTAMP_SHIFT 

Definition at line 195 of file spinlock.cc.

anonymous enum
Enumerator
LOCKWORD_RESERVED_SHIFT 

Definition at line 196 of file spinlock.cc.

Enumerator
kLinkerInitialized 

Definition at line 76 of file macros.h.

Enumerator
SCHEDULE_KERNEL_ONLY 
SCHEDULE_COOPERATIVE_AND_KERNEL 

Definition at line 46 of file scheduling_mode.h.

Function Documentation

static void absl::base_internal::AddToFreelist ( void *  v,
LowLevelAlloc::Arena arena 
)
static

Definition at line 489 of file low_level_alloc.cc.

template<typename Callable , typename... Args>
void absl::base_internal::CallOnceImpl ( std::atomic< uint32_t > *  control,
base_internal::SchedulingMode  scheduling_mode,
Callable &&  fn,
Args &&...  args 
)

Definition at line 145 of file call_once.h.

static uintptr_t absl::base_internal::CheckedAdd ( uintptr_t  a,
uintptr_t  b 
)
inlinestatic

Definition at line 434 of file low_level_alloc.cc.

void absl::base_internal::ClearCurrentThreadIdentity ( )

Definition at line 110 of file thread_identity.cc.

static void absl::base_internal::Coalesce ( AllocList *  a)
static

Definition at line 470 of file low_level_alloc.cc.

std::atomic< uint32_t > * absl::base_internal::ControlWord ( absl::once_flag flag)
inline

Definition at line 184 of file call_once.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountLeadingZeros32 ( uint32_t  n)

Definition at line 104 of file bits.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountLeadingZeros32Slow ( uint64_t  n)

Definition at line 96 of file bits.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountLeadingZeros64 ( uint64_t  n)

Definition at line 60 of file bits.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountLeadingZeros64Slow ( uint64_t  n)

Definition at line 51 of file bits.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountTrailingZerosNonZero32 ( uint32_t  n)

Definition at line 174 of file bits.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountTrailingZerosNonZero32Slow ( uint32_t  n)

Definition at line 163 of file bits.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountTrailingZerosNonZero64 ( uint64_t  n)

Definition at line 141 of file bits.h.

ABSL_BASE_INTERNAL_FORCEINLINE int absl::base_internal::CountTrailingZerosNonZero64Slow ( uint64_t  n)

Definition at line 129 of file bits.h.

ThreadIdentity * absl::base_internal::CurrentThreadIdentityIfPresent ( )

Definition at line 122 of file thread_identity.cc.

static void* absl::base_internal::DoAllocWithArena ( size_t  request,
LowLevelAlloc::Arena arena 
)
static

Definition at line 524 of file low_level_alloc.cc.

static void absl::base_internal::FreeTID ( void *  v)
static

Definition at line 340 of file sysinfo.cc.

static double absl::base_internal::GetNominalCPUFrequency ( )
static

Definition at line 216 of file sysinfo.cc.

static int absl::base_internal::GetNumCPUs ( )
static

Definition at line 65 of file sysinfo.cc.

pid_t absl::base_internal::GetTID ( )

Definition at line 363 of file sysinfo.cc.

static std::vector<uint32_t>* tid_array absl::base_internal::GUARDED_BY ( tid_lock  )
static
constexpr uintptr_t absl::base_internal::HideMask ( )

Definition at line 25 of file hide_ptr.h.

template<class T >
uintptr_t absl::base_internal::HidePtr ( T *  ptr)
inline

Definition at line 33 of file hide_ptr.h.

static void absl::base_internal::InitGetTID ( )
static

Definition at line 349 of file sysinfo.cc.

static void absl::base_internal::InitializeSystemInfo ( )
static

Definition at line 262 of file sysinfo.cc.

static int absl::base_internal::IntLog2 ( size_t  size,
size_t  base 
)
static

Definition at line 109 of file low_level_alloc.cc.

template<typename F , typename... Args>
InvokeT<F, Args...> absl::base_internal::Invoke ( F &&  f,
Args &&...  args 
)

Definition at line 181 of file invoke.h.

static void absl::base_internal::LLA_SkiplistDelete ( AllocList *  head,
AllocList *  e,
AllocList **  prev 
)
static

Definition at line 184 of file low_level_alloc.cc.

static void absl::base_internal::LLA_SkiplistInsert ( AllocList *  head,
AllocList *  e,
AllocList **  prev 
)
static

Definition at line 169 of file low_level_alloc.cc.

static int absl::base_internal::LLA_SkiplistLevels ( size_t  size,
size_t  base,
uint32_t *  random 
)
static

Definition at line 139 of file low_level_alloc.cc.

static AllocList* absl::base_internal::LLA_SkiplistSearch ( AllocList *  head,
AllocList *  e,
AllocList **  prev 
)
static

Definition at line 155 of file low_level_alloc.cc.

template<typename Callable , typename... Args>
void absl::base_internal::LowLevelCallOnce ( absl::once_flag flag,
Callable &&  fn,
Args &&...  args 
)

Definition at line 189 of file call_once.h.

static uintptr_t absl::base_internal::Magic ( uintptr_t  magic,
AllocList::Header *  ptr 
)
inlinestatic

Definition at line 320 of file low_level_alloc.cc.

static AllocList* absl::base_internal::Next ( int  i,
AllocList *  prev,
LowLevelAlloc::Arena arena 
)
static

Definition at line 451 of file low_level_alloc.cc.

double absl::base_internal::NominalCPUFrequency ( )

Definition at line 272 of file sysinfo.cc.

int absl::base_internal::NumCPUs ( )

Definition at line 267 of file sysinfo.cc.

static int absl::base_internal::Random ( uint32_t *  state)
static

Definition at line 121 of file low_level_alloc.cc.

static bool absl::base_internal::ReadLongFromFile ( const char *  file,
long *  value 
)
static

Definition at line 107 of file sysinfo.cc.

void absl::base_internal::RegisterSpinLockProfiler ( void(*)(const void *contendedlock, int64_t wait_cycles)  fn)

Definition at line 63 of file spinlock.cc.

void absl::base_internal::RegisterSpinLockProfiler ( void(*)(const void *lock, int64_t wait_cycles)  fn)
static uintptr_t absl::base_internal::RoundUp ( uintptr_t  addr,
uintptr_t  align 
)
inlinestatic

Definition at line 442 of file low_level_alloc.cc.

void absl::base_internal::SetCurrentThreadIdentity ( ThreadIdentity identity,
ThreadIdentityReclaimerFunction  reclaimer 
)

Definition at line 61 of file thread_identity.cc.

void absl::base_internal::SpinLockDelay ( std::atomic< uint32_t > *  w,
uint32_t  value,
int  loop,
base_internal::SchedulingMode  scheduling_mode 
)
inline

Definition at line 85 of file spinlock_wait.h.

int absl::base_internal::SpinLockSuggestedDelayNS ( int  loop)

Definition at line 61 of file spinlock_wait.cc.

uint32_t absl::base_internal::SpinLockWait ( std::atomic< uint32_t > *  w,
int  n,
const SpinLockWaitTransition  trans[],
base_internal::SchedulingMode  scheduling_mode 
)

Definition at line 38 of file spinlock_wait.cc.

void absl::base_internal::SpinLockWake ( std::atomic< uint32_t > *  w,
bool  all 
)
inline

Definition at line 80 of file spinlock_wait.h.

void absl::base_internal::ThrowStdBadAlloc ( )

Definition at line 103 of file throw_delegate.cc.

void absl::base_internal::ThrowStdBadFunctionCall ( )

Definition at line 101 of file throw_delegate.cc.

void absl::base_internal::ThrowStdDomainError ( const std::string &  what_arg)

Definition at line 52 of file throw_delegate.cc.

void absl::base_internal::ThrowStdDomainError ( const char *  what_arg)

Definition at line 55 of file throw_delegate.cc.

void absl::base_internal::ThrowStdInvalidArgument ( const std::string &  what_arg)

Definition at line 45 of file throw_delegate.cc.

void absl::base_internal::ThrowStdInvalidArgument ( const char *  what_arg)

Definition at line 48 of file throw_delegate.cc.

void absl::base_internal::ThrowStdLengthError ( const std::string &  what_arg)

Definition at line 59 of file throw_delegate.cc.

void absl::base_internal::ThrowStdLengthError ( const char *  what_arg)

Definition at line 62 of file throw_delegate.cc.

void absl::base_internal::ThrowStdLogicError ( const std::string &  what_arg)

Definition at line 39 of file throw_delegate.cc.

void absl::base_internal::ThrowStdLogicError ( const char *  what_arg)

Definition at line 42 of file throw_delegate.cc.

void absl::base_internal::ThrowStdOutOfRange ( const std::string &  what_arg)

Definition at line 66 of file throw_delegate.cc.

void absl::base_internal::ThrowStdOutOfRange ( const char *  what_arg)

Definition at line 69 of file throw_delegate.cc.

void absl::base_internal::ThrowStdOverflowError ( const std::string &  what_arg)

Definition at line 87 of file throw_delegate.cc.

void absl::base_internal::ThrowStdOverflowError ( const char *  what_arg)

Definition at line 90 of file throw_delegate.cc.

void absl::base_internal::ThrowStdRangeError ( const std::string &  what_arg)

Definition at line 80 of file throw_delegate.cc.

void absl::base_internal::ThrowStdRangeError ( const char *  what_arg)

Definition at line 83 of file throw_delegate.cc.

void absl::base_internal::ThrowStdRuntimeError ( const std::string &  what_arg)

Definition at line 73 of file throw_delegate.cc.

void absl::base_internal::ThrowStdRuntimeError ( const char *  what_arg)

Definition at line 76 of file throw_delegate.cc.

void absl::base_internal::ThrowStdUnderflowError ( const std::string &  what_arg)

Definition at line 94 of file throw_delegate.cc.

void absl::base_internal::ThrowStdUnderflowError ( const char *  what_arg)

Definition at line 97 of file throw_delegate.cc.

template<class T >
T* absl::base_internal::UnhidePtr ( uintptr_t  hidden)
inline

Definition at line 40 of file hide_ptr.h.

Variable Documentation

std::atomic<uint64_t> absl::base_internal::delay_rand
static

Definition at line 58 of file spinlock_wait.cc.

once_flag absl::base_internal::init_system_info_once
static

Definition at line 61 of file sysinfo.cc.

constexpr int absl::base_internal::kBitsPerWord = 32
static

Definition at line 337 of file sysinfo.cc.

const uintptr_t absl::base_internal::kMagicAllocated = 0x4c833e95U
static

Definition at line 274 of file low_level_alloc.cc.

const uintptr_t absl::base_internal::kMagicUnallocated = ~kMagicAllocated
static

Definition at line 275 of file low_level_alloc.cc.

const int absl::base_internal::kMaxLevel = 30
static

Definition at line 71 of file low_level_alloc.cc.

double absl::base_internal::nominal_cpu_frequency = 1.0
static

Definition at line 63 of file sysinfo.cc.

int absl::base_internal::num_cpus = 0
static

Definition at line 62 of file sysinfo.cc.

ABSL_CONST_INIT base_internal::AtomicHook<void (*)(const void *lock, int64_t wait_cycles)> absl::base_internal::submit_profile_data
static

Definition at line 61 of file spinlock.cc.

ABSL_PER_THREAD_TLS_KEYWORD ThreadIdentity* absl::base_internal::thread_identity_ptr

Definition at line 58 of file thread_identity.cc.

pthread_key_t absl::base_internal::tid_key
static

Definition at line 329 of file sysinfo.cc.

once_flag absl::base_internal::tid_once
static

Definition at line 328 of file sysinfo.cc.



abseil_cpp
Author(s):
autogenerated on Wed Jun 19 2019 19:19:59