#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/trace_event/trace_arguments.h"
#include <inttypes.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <ostream>
#include "base/check_op.h"
#include "base/json/string_escape.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
namespace base {
namespace trace_event {
namespace {
size_t GetAllocLength(const char* str) { … }
void CopyTraceEventParameter(char** buffer,
const char** member,
const char* end) { … }
void AppendDouble(double val, bool as_json, std::string* out) { … }
const char* TypeToString(unsigned char arg_type) { … }
void AppendValueDebugString(const TraceArguments& args,
size_t idx,
std::string* out) { … }
class PerfettoProtoAppender : public ConvertableToTraceFormat::ProtoAppender { … };
}
void StringStorage::Reset(size_t alloc_size) { … }
bool StringStorage::Contains(const TraceArguments& args) const { … }
static_assert …;
void TraceValue::AppendAsJSON(unsigned char type, std::string* out) const { … }
void TraceValue::AppendAsString(unsigned char type, std::string* out) const { … }
void TraceValue::Append(unsigned char type,
bool as_json,
std::string* out) const { … }
TraceArguments& TraceArguments::operator=(TraceArguments&& other) noexcept { … }
TraceArguments::TraceArguments(int num_args,
const char* const* arg_names,
const unsigned char* arg_types,
const unsigned long long* arg_values) { … }
void TraceArguments::Reset() { … }
void TraceArguments::CopyStringsTo(StringStorage* storage,
bool copy_all_strings,
const char** extra_string1,
const char** extra_string2) { … }
void TraceArguments::AppendDebugString(std::string* out) { … }
void ConvertableToTraceFormat::Add(
perfetto::protos::pbzero::DebugAnnotation* annotation) const { … }
}
}