Browse Source
[dynarmic] force-disable perfmap on non-platforms (#3031)
removes some annoying generated stubs with just a `retq`...
Signed-off-by: lizzie lizzie@eden-emu.dev
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3031
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
pull/3044/head
lizzie
1 month ago
committed by
crueter
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
2 changed files with
11 additions and
18 deletions
-
src/dynarmic/src/dynarmic/backend/x64/perf_map.cpp
-
src/dynarmic/src/dynarmic/backend/x64/perf_map.h
|
|
|
@ -1,3 +1,6 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
/* This file is part of the dynarmic project.
|
|
|
|
* Copyright (c) 2018 MerryMage |
|
|
|
* SPDX-License-Identifier: 0BSD |
|
|
|
@ -8,12 +11,10 @@ |
|
|
|
#include <cstddef>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
|
|
|
|
#if defined(__linux__) && !defined(__ANDROID__)
|
|
|
|
# include <cstdio>
|
|
|
|
# include <cstdlib>
|
|
|
|
# include <mutex>
|
|
|
|
|
|
|
|
# include <fmt/format.h>
|
|
|
|
# include <mcl/stdint.hpp>
|
|
|
|
# include <sys/types.h>
|
|
|
|
@ -79,16 +80,4 @@ void PerfMapClear() { |
|
|
|
|
|
|
|
} // namespace Dynarmic::Backend::X64
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
namespace Dynarmic::Backend::X64 { |
|
|
|
|
|
|
|
namespace detail { |
|
|
|
void PerfMapRegister(const void*, const void*, std::string_view) {} |
|
|
|
} // namespace detail
|
|
|
|
|
|
|
|
void PerfMapClear() {} |
|
|
|
|
|
|
|
} // namespace Dynarmic::Backend::X64
|
|
|
|
|
|
|
|
#endif
|
|
|
|
@ -14,15 +14,19 @@ |
|
|
|
|
|
|
|
namespace Dynarmic::Backend::X64 { |
|
|
|
|
|
|
|
#if defined(__linux__) && !defined(__ANDROID__) |
|
|
|
namespace detail { |
|
|
|
void PerfMapRegister(const void* start, const void* end, std::string_view friendly_name); |
|
|
|
} // namespace detail |
|
|
|
|
|
|
|
template<typename T> |
|
|
|
void PerfMapRegister(T start, const void* end, std::string_view friendly_name) { |
|
|
|
void PerfMapRegister(T start, const void* end, std::string_view friendly_name) noexcept { |
|
|
|
detail::PerfMapRegister(std::bit_cast<const void*>(start), end, friendly_name); |
|
|
|
} |
|
|
|
|
|
|
|
void PerfMapClear(); |
|
|
|
#else |
|
|
|
// Resolve to no-op (compiler thinks fmt has side effects) |
|
|
|
template<typename T> inline void PerfMapRegister(T, const void*, std::string_view) noexcept {} |
|
|
|
inline void PerfMapClear() noexcept {} |
|
|
|
#endif |
|
|
|
|
|
|
|
} // namespace Dynarmic::Backend::X64 |