llvm/compiler-rt/lib/asan/asan_stats.cpp

//===-- asan_stats.cpp ----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is a part of AddressSanitizer, an address sanity checker.
//
// Code related to statistics collected by AddressSanitizer.
//===----------------------------------------------------------------------===//
#include "asan_interceptors.h"
#include "asan_internal.h"
#include "asan_stats.h"
#include "asan_thread.h"
#include "sanitizer_common/sanitizer_allocator_interface.h"
#include "sanitizer_common/sanitizer_mutex.h"
#include "sanitizer_common/sanitizer_stackdepot.h"

namespace __asan {

AsanStats::AsanStats() {}

void AsanStats::Clear() {}

static void PrintMallocStatsArray(const char *prefix,
                                  uptr (&array)[kNumberOfSizeClasses]) {}

void AsanStats::Print() {}

void AsanStats::MergeFrom(const AsanStats *stats) {}

static Mutex print_lock;

static AsanStats unknown_thread_stats(LINKER_INITIALIZED);
static AsanStats dead_threads_stats(LINKER_INITIALIZED);
static Mutex dead_threads_stats_lock;
// Required for malloc_zone_statistics() on OS X. This can't be stored in
// per-thread AsanStats.
static uptr max_malloced_memory;

static void MergeThreadStats(ThreadContextBase *tctx_base, void *arg) {}

static void GetAccumulatedStats(AsanStats *stats) {}

void FlushToDeadThreadStats(AsanStats *stats) {}

void FillMallocStatistics(AsanMallocStats *malloc_stats) {}

AsanStats &GetCurrentThreadStats() {}

static void PrintAccumulatedStats() {}

}  // namespace __asan

// ---------------------- Interface ---------------- {{{1
usingnamespace__asan;

uptr __sanitizer_get_current_allocated_bytes() {}

uptr __sanitizer_get_heap_size() {}

uptr __sanitizer_get_free_bytes() {}

uptr __sanitizer_get_unmapped_bytes() {}

void __asan_print_accumulated_stats() {}