#include "base/debug/dump_without_crashing.h"
#include <map>
#include <utility>
#include "base/check.h"
#include "base/debug/crash_logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/no_destructor.h"
#include "base/synchronization/lock.h"
#include "base/trace_event/base_tracing.h"
#include "build/buildflag.h"
namespace {
void (*dump_without_crashing_function_)() = …;
template <typename Map, typename Key>
bool ShouldDump(Map& map, Key& key, base::TimeDelta time_between_dumps) { … }
std::map<base::Location, base::TimeTicks>& LocationToTimestampMap() { … }
std::map<std::pair<base::Location, size_t>, base::TimeTicks>&
LocationAndUniqueIdentifierToTimestampMap() { … }
bool ShouldDumpWithoutCrashWithLocation(const base::Location& location,
base::TimeDelta time_between_dumps) { … }
bool ShouldDumpWithoutCrashWithLocationAndUniqueId(
size_t unique_identifier,
const base::Location& location,
base::TimeDelta time_between_dumps) { … }
}
namespace base {
namespace debug {
bool DumpWithoutCrashingUnthrottled() { … }
bool DumpWithoutCrashing(const base::Location& location,
base::TimeDelta time_between_dumps) { … }
bool DumpWithoutCrashingWithUniqueId(size_t unique_identifier,
const base::Location& location,
base::TimeDelta time_between_dumps) { … }
void SetDumpWithoutCrashingFunction(void (*function)()) { … }
void ClearMapsForTesting() { … }
}
}