duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

perf_scope.h (547B)


      1 // SPDX-FileCopyrightText: 2023 Connor McLaughlin <stenzek@gmail.com>, PCSX2 Team
      2 // SPDX-License-Identifier: GPL-3.0
      3 
      4 #pragma once
      5 
      6 #include "types.h"
      7 
      8 class PerfScope
      9 {
     10 public:
     11   constexpr PerfScope(const char* prefix) : m_prefix(prefix) {}
     12   bool HasPrefix() const { return (m_prefix && m_prefix[0]); }
     13 
     14   void Register(const void* ptr, size_t size, const char* symbol);
     15   void RegisterPC(const void* ptr, size_t size, u32 pc);
     16   void RegisterKey(const void* ptr, size_t size, const char* prefix, u64 key);
     17 
     18 private:
     19   const char* m_prefix;
     20 };