text stringlengths 1 24.5M |
|---|
#include <sstream>
#include "TracyFilesystem.hpp"
#include "TracyImGui.hpp"
#include "TracyPrint.hpp"
#include "TracyView.hpp"
#include "tracy_pdqsort.h"
namespace tracy
{
extern double s_time;
struct SrcLocZonesSlim
{
int16_t srcloc;
uint16_t numThreads;
size_t numZones;
int64_t total;
};
void Vie... |
#include <algorithm>
#include "TracyImGui.hpp"
#include "TracyMouse.hpp"
#include "TracyPrint.hpp"
#include "TracySourceView.hpp"
#include "TracyTimelineItemCpuData.hpp"
#include "TracyTimelineItemGpu.hpp"
#include "TracyTimelineItemPlot.hpp"
#include "TracyTimelineItemThread.hpp"
#include "TracyView.hpp"
namespace t... |
#include <inttypes.h>
#include "TracyImGui.hpp"
#include "TracyPrint.hpp"
#include "TracyView.hpp"
#include "tracy_pdqsort.h"
namespace tracy
{
extern double s_time;
void View::DrawInfo()
{
const auto scale = GetScale();
ImGui::SetNextWindowSize( ImVec2( 400 * scale, 650 * scale ), ImGuiCond_FirstUseEver );... |
#include <inttypes.h>
#include "TracyColor.hpp"
#include "TracyPrint.hpp"
#include "TracyUtility.hpp"
#include "TracyView.hpp"
namespace tracy
{
bool View::IsFrameExternal( const char* filename, const char* image )
{
if( strncmp( filename, "/usr/", 5 ) == 0 || strncmp( filename, "/lib/", 5 ) == 0 || strcmp( file... |
#include <inttypes.h>
#include "TracyFilesystem.hpp"
#include "TracyImGui.hpp"
#include "TracyPrint.hpp"
#include "TracyMouse.hpp"
#include "TracyView.hpp"
#include "tracy_pdqsort.h"
namespace tracy
{
extern double s_time;
template<typename T>
static inline uint32_t GetZoneCallstack( const T& ev, const Worker& work... |
#include <inttypes.h>
#include "TracyColor.hpp"
#include "TracyImGui.hpp"
#include "TracyMouse.hpp"
#include "TracyPrint.hpp"
#include "TracyTimelineContext.hpp"
#include "TracyTimelineDraw.hpp"
#include "TracyView.hpp"
namespace tracy
{
extern double s_time;
constexpr float MinVisSize = 3;
static tracy_force_inli... |
#ifdef _WIN32
# include <windows.h>
# include <shellapi.h>
#elif defined __EMSCRIPTEN__
# include <emscripten.h>
#else
# include <stdio.h>
# include <stdlib.h>
#endif
#include "TracyWeb.hpp"
namespace tracy
{
void OpenWebpage( const char* url )
{
#ifdef _WIN32
ShellExecuteA( nullptr, nullptr, url, nullptr, ... |
#ifndef __TRACYWEB_HPP__
#define __TRACYWEB_HPP__
namespace tracy
{
void OpenWebpage( const char* url );
}
#endif
|
//
// Tracy profiler
// ----------------
//
// For fast integration, compile and
// link with this source file (and none
// other) in your executable (or in the
// main DLL / shared object on multi-DLL
// projects).
//
// Define TRACY_ENABLE to enable profiler.
#include "common/TracySystem.cpp"
#ifd... |
#include "../common/TracyAlloc.hpp"
#ifdef TRACY_USE_RPMALLOC
#include <atomic>
#include "../common/TracyForceInline.hpp"
#include "../common/TracyYield.hpp"
namespace tracy
{
extern thread_local bool RpThreadInitDone;
extern std::atomic<int> RpInitDone;
extern std::atomic<int> RpInitLock;
tracy_no_inline static ... |
namespace tracy
{
#if defined __linux__ && defined __ARM_ARCH
static const char* DecodeArmImplementer( uint32_t v )
{
static char buf[16];
switch( v )
{
case 0x41: return "ARM";
case 0x42: return "Broadcom";
case 0x43: return "Cavium";
case 0x44: return "DEC";
case 0x46: return "Fujits... |
#include <limits>
#include <new>
#include <stdio.h>
#include <string.h>
#include "TracyCallstack.hpp"
#include "TracyDebug.hpp"
#include "TracyFastVector.hpp"
#include "TracyStringHelpers.hpp"
#include "../common/TracyAlloc.hpp"
#include "../common/TracySystem.hpp"
#ifdef TRACY_HAS_CALLSTACK
#if TRACY_HAS_CALLSTACK ... |
#ifndef __TRACYCALLSTACK_H__
#define __TRACYCALLSTACK_H__
#ifndef TRACY_NO_CALLSTACK
# if !defined _WIN32
# include <sys/param.h>
# endif
# if defined _WIN32
# include "../common/TracyUwp.hpp"
# ifndef TRACY_UWP
# define TRACY_HAS_CALLSTACK 1
# endif
# elif defined __ANDROID__
# if !defined _... |
#ifndef __TRACYCALLSTACK_HPP__
#define __TRACYCALLSTACK_HPP__
#include "../common/TracyApi.h"
#include "../common/TracyForceInline.hpp"
#include "TracyCallstack.h"
#ifndef TRACY_HAS_CALLSTACK
namespace tracy
{
static constexpr bool has_callstack() { return false; }
static tracy_force_inline void* Callstack( int32_t ... |
#ifndef __TRACYCPUID_HPP__
#define __TRACYCPUID_HPP__
// Prior to GCC 11 the cpuid.h header did not have any include guards and thus
// including it more than once would cause a compiler error due to symbol
// redefinitions. In order to support older GCC versions, we have to wrap this
// include between custom include... |
#ifndef __TRACYPRINT_HPP__
#define __TRACYPRINT_HPP__
#ifdef TRACY_VERBOSE
# include <stdio.h>
# define TracyDebug(...) fprintf( stderr, __VA_ARGS__ );
#else
# define TracyDebug(...)
#endif
#endif
|
#include "TracyDxt1.hpp"
#include "../common/TracyForceInline.hpp"
#include <assert.h>
#include <stdint.h>
#include <string.h>
#ifdef __ARM_NEON
# include <arm_neon.h>
#endif
#if defined __AVX__ && !defined __SSE4_1__
# define __SSE4_1__
#endif
#if defined __SSE4_1__ || defined __AVX2__
# ifdef _MSC_VER
# inc... |
#ifndef __TRACYDXT1_HPP__
#define __TRACYDXT1_HPP__
namespace tracy
{
void CompressImageDxt1( const char* src, char* dst, int w, int h );
}
#endif
|
#ifndef __TRACYFASTVECTOR_HPP__
#define __TRACYFASTVECTOR_HPP__
#include <assert.h>
#include <stddef.h>
#include "../common/TracyAlloc.hpp"
#include "../common/TracyForceInline.hpp"
namespace tracy
{
template<typename T>
class FastVector
{
public:
using iterator = T*;
using const_iterator = const T*;
F... |
#ifdef __linux__
#include <algorithm>
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include <unistd.h>
#include "TracyDebug.hpp"
#include "TracyKCore.hpp"
#include "../common/TracyAlloc.hpp"
#if !defined(__GLIBC__) && !defined(__WORDSIZE)
// include __WORDSIZE headers for musl
# include <bits/reg.h>
#... |
#ifndef __TRACYKCORE_HPP__
#define __TRACYKCORE_HPP__
#ifdef __linux__
#include <stdint.h>
#include "TracyFastVector.hpp"
namespace tracy
{
class KCore
{
struct Offset
{
uint64_t start;
uint64_t size;
uint64_t offset;
};
public:
KCore();
~KCore();
void* Retrieve( u... |
#ifndef __TRACYLOCK_HPP__
#define __TRACYLOCK_HPP__
#include <atomic>
#include <limits>
#include "../common/TracySystem.hpp"
#include "../common/TracyAlign.hpp"
#include "TracyProfiler.hpp"
namespace tracy
{
class LockableCtx
{
public:
tracy_force_inline LockableCtx( const SourceLocationData* srcloc )
:... |
#ifdef TRACY_ENABLE
# ifdef __linux__
# include "TracyDebug.hpp"
# ifdef TRACY_VERBOSE
# include <dlfcn.h>
# include <link.h>
# endif
extern "C" int dlclose( void* hnd )
{
#ifdef TRACY_VERBOSE
struct link_map* lm;
if( dlinfo( hnd, RTLD_DI_LINKMAP, &lm ) == 0 )
{
TracyDebug( "Ove... |
#ifdef TRACY_ENABLE
#ifdef _WIN32
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <winsock2.h>
# include <windows.h>
# include <tlhelp32.h>
# include <inttypes.h>
# include <intrin.h>
# include "../common/TracyUwp.hpp"
#else
# include <sys/time.h>
# include <sys/param.h>
#endif
#ifdef _GNU_SOURCE
#... |
#ifndef __TRACYPROFILER_HPP__
#define __TRACYPROFILER_HPP__
#include <assert.h>
#include <atomic>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include "tracy_concurrentqueue.h"
#include "tracy_SPSCQueue.h"
#include "TracyCallstack.hpp"
#include "TracyKCore.hpp"
#include "TracySysPower.hpp"
#include "Tra... |
#include <atomic>
#include <assert.h>
#include <errno.h>
#include <linux/perf_event.h>
#include <stdint.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include "TracyDebug.hpp"
namespace tracy
{
class RingBuffer
{
public:
RingBuffer( unsigned int size, int fd, int id, int... |
#ifndef __TRACYSCOPED_HPP__
#define __TRACYSCOPED_HPP__
#include <limits>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include "../common/TracySystem.hpp"
#include "../common/TracyAlign.hpp"
#include "../common/TracyAlloc.hpp"
#include "TracyProfiler.hpp"
#include "TracyCallstack.hpp"
namespace tracy... |
#ifndef __TRACYSTRINGHELPERS_HPP__
#define __TRACYSTRINGHELPERS_HPP__
#include <assert.h>
#include <string.h>
#include "../common/TracyAlloc.hpp"
#include "../common/TracyForceInline.hpp"
namespace tracy
{
static tracy_force_inline char* CopyString( const char* src, size_t sz )
{
auto dst = (char*)tracy_malloc(... |
#include "TracySysPower.hpp"
#ifdef TRACY_HAS_SYSPOWER
#include <sys/types.h>
#include <dirent.h>
#include <chrono>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include "TracyDebug.hpp"
#include "TracyProfiler.hpp"
#include "../common/TracyAlloc.hpp"
namespace tracy
{
SysPower::SysPower()
: m_... |
#ifndef __TRACYSYSPOWER_HPP__
#define __TRACYSYSPOWER_HPP__
#if defined __linux__
# define TRACY_HAS_SYSPOWER
#endif
#ifdef TRACY_HAS_SYSPOWER
#include <stdint.h>
#include <stdio.h>
#include "TracyFastVector.hpp"
namespace tracy
{
class SysPower
{
struct Domain
{
uint64_t value;
uint64_t ... |
#include "TracySysTime.hpp"
#ifdef TRACY_HAS_SYSTIME
# if defined _WIN32
# include <windows.h>
# elif defined __linux__
# include <stdio.h>
# include <inttypes.h>
# elif defined __APPLE__
# include <mach/mach_host.h>
# include <mach/host_info.h>
# elif defined BSD
# include <sys/types.h>
# in... |
#ifndef __TRACYSYSTIME_HPP__
#define __TRACYSYSTIME_HPP__
#if defined _WIN32 || defined __linux__ || defined __APPLE__
# define TRACY_HAS_SYSTIME
#else
# include <sys/param.h>
#endif
#ifdef BSD
# define TRACY_HAS_SYSTIME
#endif
#ifdef TRACY_HAS_SYSTIME
#include <stdint.h>
namespace tracy
{
class SysTime
{
publ... |
#include "TracyDebug.hpp"
#include "TracyStringHelpers.hpp"
#include "TracySysTrace.hpp"
#include "../common/TracySystem.hpp"
#ifdef TRACY_HAS_SYSTEM_TRACING
#ifndef TRACY_SAMPLING_HZ
# if defined _WIN32
# define TRACY_SAMPLING_HZ 8000
# elif defined __linux__
# define TRACY_SAMPLING_HZ 10000
# endif
#endif
... |
#ifndef __TRACYSYSTRACE_HPP__
#define __TRACYSYSTRACE_HPP__
#if !defined TRACY_NO_SYSTEM_TRACING && ( defined _WIN32 || defined __linux__ )
# include "../common/TracyUwp.hpp"
# ifndef TRACY_UWP
# define TRACY_HAS_SYSTEM_TRACING
# endif
#endif
#ifdef TRACY_HAS_SYSTEM_TRACING
#include <stdint.h>
namespace tracy... |
#ifndef __TRACYTHREAD_HPP__
#define __TRACYTHREAD_HPP__
#if defined _WIN32
# include <windows.h>
#else
# include <pthread.h>
#endif
#ifdef TRACY_MANUAL_LIFETIME
# include "tracy_rpmalloc.hpp"
#endif
namespace tracy
{
#ifdef TRACY_MANUAL_LIFETIME
extern thread_local bool RpThreadInitDone;
#endif
class ThreadExit... |
// Provides a C++11 implementation of a multi-producer, multi-consumer lock-free queue.
// An overview, including benchmark results, is provided here:
// http://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++
// The full design is also described in excruciating detail at:
// http://moo... |
#ifdef TRACY_ENABLE
/* rpmalloc.c - Memory allocator - Public Domain - 2016-2020 Mattias Jansson
*
* This library provides a cross-platform lock free thread caching malloc implementation in C11.
* The latest source code is always available at
*
* https://github.com/mjansson/rpmalloc
*
* This library is pu... |
/* rpmalloc.h - Memory allocator - Public Domain - 2016 Mattias Jansson
*
* This library provides a cross-platform lock free thread caching malloc implementation in C11.
* The latest source code is always available at
*
* https://github.com/mjansson/rpmalloc
*
* This library is put in the public domain; yo... |
/*
Copyright (c) 2020 Erik Rigtorp <erik@rigtorp.se>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publi... |
#ifndef __TRACYALIGN_HPP__
#define __TRACYALIGN_HPP__
#include <string.h>
#include "TracyForceInline.hpp"
namespace tracy
{
template<typename T>
tracy_force_inline T MemRead( const void* ptr )
{
T val;
memcpy( &val, ptr, sizeof( T ) );
return val;
}
template<typename T>
tracy_force_inline void MemWrite... |
#ifndef __TRACYALLOC_HPP__
#define __TRACYALLOC_HPP__
#include <stdlib.h>
#if defined TRACY_ENABLE && !defined __EMSCRIPTEN__
# include "TracyApi.h"
# include "TracyForceInline.hpp"
# include "../client/tracy_rpmalloc.hpp"
# define TRACY_USE_RPMALLOC
#endif
namespace tracy
{
#ifdef TRACY_USE_RPMALLOC
TRACY_API ... |
#ifndef __TRACYAPI_H__
#define __TRACYAPI_H__
#if defined _WIN32
# if defined TRACY_EXPORTS
# define TRACY_API __declspec(dllexport)
# elif defined TRACY_IMPORTS
# define TRACY_API __declspec(dllimport)
# else
# define TRACY_API
# endif
#else
# define TRACY_API __attribute__((visibility("default")))
#end... |
#ifndef __TRACYCOLOR_HPP__
#define __TRACYCOLOR_HPP__
namespace tracy
{
struct Color
{
enum ColorType
{
Snow = 0xfffafa,
GhostWhite = 0xf8f8ff,
WhiteSmoke = 0xf5f5f5,
Gainsboro = 0xdcdcdc,
FloralWhite = 0xfffaf0,
OldLace = 0xfdf5e6,
Linen = 0xfaf0e6,
AntiqueWhite = 0xfaebd7,
PapayaW... |
#ifndef __TRACYFORCEINLINE_HPP__
#define __TRACYFORCEINLINE_HPP__
#if defined(__GNUC__)
# define tracy_force_inline __attribute__((always_inline)) inline
#elif defined(_MSC_VER)
# define tracy_force_inline __forceinline
#else
# define tracy_force_inline inline
#endif
#if defined(__GNUC__)
# define tracy_no_inline... |
#ifndef __TRACYMUTEX_HPP__
#define __TRACYMUTEX_HPP__
#if defined _MSC_VER
# include <shared_mutex>
namespace tracy
{
using TracyMutex = std::shared_mutex;
}
#else
#include <mutex>
namespace tracy
{
using TracyMutex = std::mutex;
}
#endif
#endif
|
#ifndef __TRACYPROTOCOL_HPP__
#define __TRACYPROTOCOL_HPP__
#include <limits>
#include <stdint.h>
namespace tracy
{
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
enum : uint32_t { ProtocolVersion = 74 };
enum : uint16_t { BroadcastVersion = 3 };
using lz4sz_t = uint... |
#ifndef __TRACYQUEUE_HPP__
#define __TRACYQUEUE_HPP__
#include <stddef.h>
#include <stdint.h>
namespace tracy
{
enum class QueueType : uint8_t
{
ZoneText,
ZoneName,
Message,
MessageColor,
MessageCallstack,
MessageColorCallstack,
MessageAppInfo,
ZoneBeginAllocSrcLoc,
ZoneBeginAlloc... |
#include <assert.h>
#include <inttypes.h>
#include <new>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "TracyAlloc.hpp"
#include "TracySocket.hpp"
#include "TracySystem.hpp"
#ifdef _WIN32
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <winsock2.h>
# include <... |
#ifndef __TRACYSOCKET_HPP__
#define __TRACYSOCKET_HPP__
#include <atomic>
#include <stddef.h>
#include <stdint.h>
struct addrinfo;
struct sockaddr;
namespace tracy
{
#ifdef _WIN32
void InitWinSock();
#endif
class Socket
{
public:
Socket();
Socket( int sock );
~Socket();
bool Connect( const char* a... |
#include "TracyStackFrames.hpp"
namespace tracy
{
const char* s_tracyStackFrames_[] = {
"tracy::Callstack",
"tracy::Callstack(int)",
"tracy::GpuCtxScope::{ctor}",
"tracy::Profiler::SendCallstack",
"tracy::Profiler::SendCallstack(int)",
"tracy::Profiler::SendCallstack(int, unsigned long)",
... |
#ifndef __TRACYSTACKFRAMES_HPP__
#define __TRACYSTACKFRAMES_HPP__
#include <stddef.h>
namespace tracy
{
struct StringMatch
{
const char* str;
size_t len;
};
extern const char** s_tracyStackFrames;
extern const StringMatch* s_tracySkipSubframes;
static constexpr int s_tracySkipSubframesMinLen = 7;
}
#endi... |
#ifdef _MSC_VER
# pragma warning(disable:4996)
#endif
#if defined _WIN32
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <windows.h>
# include <malloc.h>
# include "TracyUwp.hpp"
#else
# include <pthread.h>
# include <string.h>
# i... |
#ifndef __TRACYSYSTEM_HPP__
#define __TRACYSYSTEM_HPP__
#include <stdint.h>
#include "TracyApi.h"
namespace tracy
{
namespace detail
{
TRACY_API uint32_t GetThreadHandleImpl();
}
#ifdef TRACY_ENABLE
struct ThreadNameData
{
uint32_t id;
int32_t groupHint;
const char* name;
ThreadNameData* next;
};
... |
#ifndef __TRACYUWP_HPP__
#define __TRACYUWP_HPP__
#ifdef _WIN32
# include <winapifamily.h>
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
# define TRACY_UWP
# endif
#endif
#endif
|
#ifndef __TRACYVERSION_HPP__
#define __TRACYVERSION_HPP__
namespace tracy
{
namespace Version
{
enum { Major = 0 };
enum { Minor = 12 };
enum { Patch = 0 };
}
}
#endif
|
#ifndef __TRACYYIELD_HPP__
#define __TRACYYIELD_HPP__
#if defined __SSE2__ || defined _M_AMD64 || (defined _M_IX86_FP && _M_IX86_FP == 2)
# include <emmintrin.h>
#else
# include <thread>
#endif
#include "TracyForceInline.hpp"
namespace tracy
{
static tracy_force_inline void YieldThread()
{
#if defined __SSE2__ ||... |
/*
LZ4 - Fast LZ compression algorithm
Copyright (C) 2011-2020, Yann Collet.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
... |
/*
* LZ4 - Fast LZ compression algorithm
* Header File
* Copyright (C) 2011-2020, Yann Collet.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions ... |
/*
LZ4 HC - High Compression Mode of LZ4
Copyright (C) 2011-2020, Yann Collet.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met... |
/*
LZ4 HC - High Compression Mode of LZ4
Header File
Copyright (C) 2011-2020, Yann Collet.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions ar... |
/* alloc.c -- Memory allocation without mmap.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistributions of sour... |
/* backtrace.h -- Public header file for stack backtrace library.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Red... |
#include <limits.h>
#if defined(__linux__) && !defined(__GLIBC__) && !defined(__WORDSIZE)
// include __WORDSIZE headers for musl
# include <bits/reg.h>
#endif
#if __WORDSIZE == 64
# define BACKTRACE_ELF_SIZE 64
#else
# define BACKTRACE_ELF_SIZE 32
#endif
#define HAVE_DLFCN_H 1
#define HAVE_FCNTL 1
#define HAVE_INTT... |
/* dwarf.c -- Get file/line information from DWARF for backtraces.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Re... |
/* elf.c -- Get debug data from an ELF file for backtraces.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistrib... |
/* fileline.c -- Get file and line number information in a backtrace.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1)... |
/* btest.c -- Filename header for libbacktrace library
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistribution... |
/* internal.h -- Internal header file for stack backtrace library.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Re... |
/* elf.c -- Get debug data from a Mach-O file for backtraces.
Copyright (C) 2020-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistr... |
/* mmapio.c -- File views using mmap.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistributions of source code ... |
/* posix.c -- POSIX file I/O routines for the backtrace library.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redi... |
/* sort.c -- Sort without allocating memory
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistributions of source... |
/* state.c -- Create the backtrace state.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistributions of source c... |
#ifndef __TRACY_HPP__
#define __TRACY_HPP__
#include "../common/TracyColor.hpp"
#include "../common/TracySystem.hpp"
#ifndef TracyFunction
# define TracyFunction __FUNCTION__
#endif
#ifndef TracyFile
# define TracyFile __FILE__
#endif
#ifndef TracyLine
# define TracyLine TracyConcat(__LINE__,U) // MSVC Edit and ... |
#ifndef __TRACYC_HPP__
#define __TRACYC_HPP__
#include <stddef.h>
#include <stdint.h>
#include "../common/TracyApi.h"
#ifdef __cplusplus
extern "C" {
#endif
enum TracyPlotFormatEnum
{
TracyPlotFormatNumber,
TracyPlotFormatMemory,
TracyPlotFormatPercentage,
TracyPlotFormatWatt
};
TRACY_API void ___t... |
#ifndef __TRACYCUDA_HPP__
#define __TRACYCUDA_HPP__
#ifndef TRACY_ENABLE
#define TracyCUDAContext() nullptr
#define TracyCUDAContextDestroy(ctx)
#define TracyCUDAContextName(ctx, name, size)
#define TracyCUDAStartProfiling(ctx)
#define TracyCUDAStopProfiling(ctx)
#define TracyCUDACollect(ctx)
#else
#include <cupti... |
#ifndef __TRACYD3D11_HPP__
#define __TRACYD3D11_HPP__
#ifndef TRACY_ENABLE
#define TracyD3D11Context(device,queue) nullptr
#define TracyD3D11Destroy(ctx)
#define TracyD3D11ContextName(ctx, name, size)
#define TracyD3D11NewFrame(ctx)
#define TracyD3D11Zone(ctx, name)
#define TracyD3D11ZoneC(ctx, name, color)
#define... |
#ifndef __TRACYD3D12_HPP__
#define __TRACYD3D12_HPP__
#ifndef TRACY_ENABLE
#define TracyD3D12Context(device, queue) nullptr
#define TracyD3D12Destroy(ctx)
#define TracyD3D12ContextName(ctx, name, size)
#define TracyD3D12NewFrame(ctx)
#define TracyD3D12Zone(ctx, cmdList, name)
#define TracyD3D12ZoneC(ctx, cmdList, n... |
#ifndef __TRACYLUA_HPP__
#define __TRACYLUA_HPP__
// Include this file after you include lua headers.
#ifndef TRACY_ENABLE
#include <string.h>
namespace tracy
{
namespace detail
{
static inline int noop( lua_State* L ) { return 0; }
}
static inline void LuaRegister( lua_State* L )
{
lua_newtable( L );
lua... |
#ifndef __TRACYOPENCL_HPP__
#define __TRACYOPENCL_HPP__
#if !defined TRACY_ENABLE
#define TracyCLContext(c, x) nullptr
#define TracyCLDestroy(c)
#define TracyCLContextName(c, x, y)
#define TracyCLNamedZone(c, x, y, z)
#define TracyCLNamedZoneC(c, x, y, z, w)
#define TracyCLZone(c, x)
#define TracyCLZoneC(c, x, y)
#d... |
#ifndef __TRACYOPENGL_HPP__
#define __TRACYOPENGL_HPP__
#if !defined TRACY_ENABLE || defined __APPLE__
#define TracyGpuContext
#define TracyGpuContextName(x,y)
#define TracyGpuNamedZone(x,y,z)
#define TracyGpuNamedZoneC(x,y,z,w)
#define TracyGpuZone(x)
#define TracyGpuZoneC(x,y)
#define TracyGpuZoneTransient(x,y,z)
#... |
#ifndef __TRACYVULKAN_HPP__
#define __TRACYVULKAN_HPP__
#if !defined TRACY_ENABLE
#define TracyVkContext(x,y,z,w) nullptr
#define TracyVkContextCalibrated(x,y,z,w,a,b) nullptr
#if defined VK_EXT_host_query_reset
#define TracyVkContextHostCalibrated(x,y,z,w,a) nullptr
#endif
#define TracyVkDestroy(x)
#define TracyVkCo... |
#ifndef __TRACY__CHARUTIL_HPP__
#define __TRACY__CHARUTIL_HPP__
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#define XXH_INLINE_ALL
#include "tracy_xxhash.h"
namespace tracy
{
namespace charutil
{
static inline size_t hash( const char* str )
{
const auto sz = strlen( str );
return XXH3_64bits... |
#ifndef __TRACYEVENT_HPP__
#define __TRACYEVENT_HPP__
#include <assert.h>
#include <limits>
#include <stdint.h>
#include <string>
#include <string.h>
#include "TracyCharUtil.hpp"
#include "TracyShortPtr.hpp"
#include "TracySortedVector.hpp"
#include "TracyVector.hpp"
#include "tracy_robin_hood.h"
#include "../public/... |
#ifndef __TRACYFILEHEADER_HPP__
#define __TRACYFILEHEADER_HPP__
#include <stdint.h>
#include "../public/common/TracyForceInline.hpp"
namespace tracy
{
static const uint8_t TracyHeader[4] = { 't', 'r', 253, 'P' };
static const uint8_t Lz4Header[4] = { 't', 'l', 'Z', 4 };
static const uint8_t ZstdHeader[4] = { 't', ... |
#ifndef __TRACYFILEMETA_HPP__
#define __TRACYFILEMETA_HPP__
#include <algorithm>
#include <stddef.h>
#include <zstd.h>
#include "../public/common/tracy_lz4.hpp"
namespace tracy
{
constexpr size_t FileBufSize = 64 * 1024;
constexpr size_t FileBoundSize = std::max( LZ4_COMPRESSBOUND( FileBufSize ), ZSTD_COMPRESSBOUND... |
#ifndef __TRACYFILEREAD_HPP__
#define __TRACYFILEREAD_HPP__
#include <assert.h>
#include <atomic>
#include <algorithm>
#include <condition_variable>
#include <stdexcept>
#include <stdio.h>
#include <string.h>
#include <string>
#include <sys/stat.h>
#include <thread>
#include <utility>
#include <vector>
#include <zstd.... |
#ifndef __TRACYFILEWRITE_HPP__
#define __TRACYFILEWRITE_HPP__
#ifdef _MSC_VER
# pragma warning( disable: 4267 ) // conversion from don't care to whatever, possible loss of data
#endif
#include <algorithm>
#include <assert.h>
#include <condition_variable>
#include <mutex>
#include <stdio.h>
#include <string.h>
#inc... |
#include "TracyMemory.hpp"
namespace tracy
{
std::atomic<int64_t> memUsage( 0 );
}
|
#ifndef __TRACYMEMORY_HPP__
#define __TRACYMEMORY_HPP__
#include <atomic>
#include <stdint.h>
namespace tracy
{
extern std::atomic<int64_t> memUsage;
}
#endif
|
#include "TracyMmap.hpp"
#if defined _WIN32
# include <io.h>
# include <windows.h>
void* mmap( void* addr, size_t length, int prot, int flags, int fd, off_t offset )
{
HANDLE hnd;
void* map = nullptr;
switch( prot )
{
case PROT_READ:
if( hnd = CreateFileMapping( HANDLE( _get_osfhandle( ... |
#ifndef __TRACYMMAP_HPP__
#define __TRACYMMAP_HPP__
#if !defined _WIN32
# include <sys/mman.h>
#else
# include <string.h>
# include <sys/types.h>
# define PROT_READ 1
# define PROT_WRITE 2
# define MAP_SHARED 0
void* mmap( void* addr, size_t length, int prot, int flags, int fd, off_t offset );
int munmap( void... |
#ifndef __TRACYPOPCNT_HPP__
#define __TRACYPOPCNT_HPP__
#include <limits.h>
#include <stdint.h>
#if defined _WIN64
# include <intrin.h>
# define TracyCountBits __popcnt64
# define TracyLzcnt __lzcnt64
#elif defined __GNUC__ || defined __clang__
static inline uint64_t TracyCountBits( uint64_t i )
{
return uint6... |
#ifdef _MSC_VER
# pragma warning( disable: 4244 ) // conversion from don't care to whatever, possible loss of data
#endif
#ifdef __MINGW32__
# define __STDC_FORMAT_MACROS
#endif
#include <assert.h>
#include <inttypes.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h> // llabs()
#include... |
#ifndef __TRACYPRINT_HPP__
#define __TRACYPRINT_HPP__
#if ( defined _MSC_VER && _MSVC_LANG >= 201703L ) || __cplusplus >= 201703L
# if __has_include(<charconv>) && __has_include(<type_traits>)
# include <charconv>
# include <type_traits>
# else
# define NO_CHARCONV
# endif
#else
# define NO_CHARCONV
#endi... |
#ifndef __TRACYSHORTPTR_HPP__
#define __TRACYSHORTPTR_HPP__
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include "../public/common/TracyForceInline.hpp"
namespace tracy
{
#if UINTPTR_MAX == 0xFFFFFFFFFFFFFFFF
template<typename T>
class short_ptr
{
public:
tracy_force_inline short_ptr() {}
tr... |
#ifndef __TRACYSLAB_HPP__
#define __TRACYSLAB_HPP__
#include <assert.h>
#include <stdint.h>
#include <vector>
#include "TracyMemory.hpp"
#include "../public/common/TracyForceInline.hpp"
namespace tracy
{
template<size_t BlockSize>
class Slab
{
public:
Slab()
: m_ptr( new char[BlockSize] )
, m_of... |
#ifndef __TRACYSORT_HPP__
#define __TRACYSORT_HPP__
#ifdef __EMSCRIPTEN__
# include "tracy_pdqsort.h"
#else
# include <ppqsort.h>
#endif
#endif
|
#ifndef __TRACYSORTEDVECTOR_HPP__
#define __TRACYSORTEDVECTOR_HPP__
#include "TracySort.hpp"
#include "TracyVector.hpp"
namespace tracy
{
#pragma pack( push, 1 )
template<typename T, class CompareDefault = std::less<T>>
class SortedVector
{
public:
using iterator = T*;
using const_iterator = const T*;
t... |
#ifndef __TRACYSTRINGDISCOVERY_HPP__
#define __TRACYSTRINGDISCOVERY_HPP__
#include "../public/common/TracyForceInline.hpp"
#include "tracy_robin_hood.h"
#include "TracyCharUtil.hpp"
#include "TracyEvent.hpp"
#include "TracyVector.hpp"
namespace tracy
{
template<typename T>
class StringDiscovery
{
public:
tracy_f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.