summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-04-13 01:35:25 +0200
committerGitHub <noreply@github.com>2024-04-13 01:35:25 +0200
commit0c1a76398bd1dcc9a8efdd796fbfb0ee5aec4a95 (patch)
tree3eddefeef4e7eaafe9b4bf762b3b8ec97cb3ce19 /Source/Core/Common
parenta44511741c81f3cbc29b66a7cbf75333fcf517b5 (diff)
parent94712ea06f694d02e8490efe7664054a037a9c75 (diff)
Merge pull request #12691 from mitaclaw/jit-profiling-restoration
JitCache: Software Profiling Restoration
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/CMakeLists.txt2
-rw-r--r--Source/Core/Common/CommonPaths.h1
-rw-r--r--Source/Core/Common/FileUtil.cpp4
-rw-r--r--Source/Core/Common/FileUtil.h1
-rw-r--r--Source/Core/Common/PerformanceCounter.cpp47
-rw-r--r--Source/Core/Common/PerformanceCounter.h16
6 files changed, 6 insertions, 65 deletions
diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt
index 1431239af2..7b81cd2c6d 100644
--- a/Source/Core/Common/CMakeLists.txt
+++ b/Source/Core/Common/CMakeLists.txt
@@ -108,8 +108,6 @@ add_library(common
Network.h
PcapFile.cpp
PcapFile.h
- PerformanceCounter.cpp
- PerformanceCounter.h
Profiler.cpp
Profiler.h
QoSSession.cpp
diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h
index 1dce5c47f5..bd0f946991 100644
--- a/Source/Core/Common/CommonPaths.h
+++ b/Source/Core/Common/CommonPaths.h
@@ -77,6 +77,7 @@
#define DUMP_SSL_DIR "SSL"
#define DUMP_DEBUG_DIR "Debug"
#define DUMP_DEBUG_BRANCHWATCH_DIR "BranchWatch"
+#define DUMP_DEBUG_JITBLOCKS_DIR "JitBlocks"
#define LOGS_DIR "Logs"
#define MAIL_LOGS_DIR "Mail"
#define SHADERS_DIR "Shaders"
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index 20c57c2b5a..a93db638df 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -859,6 +859,8 @@ static void RebuildUserDirectories(unsigned int dir_index)
s_user_paths[D_DUMPDEBUG_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_DEBUG_DIR DIR_SEP;
s_user_paths[D_DUMPDEBUG_BRANCHWATCH_IDX] =
s_user_paths[D_DUMPDEBUG_IDX] + DUMP_DEBUG_BRANCHWATCH_DIR DIR_SEP;
+ s_user_paths[D_DUMPDEBUG_JITBLOCKS_IDX] =
+ s_user_paths[D_DUMPDEBUG_IDX] + DUMP_DEBUG_JITBLOCKS_DIR DIR_SEP;
s_user_paths[D_LOGS_IDX] = s_user_paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
s_user_paths[D_MAILLOGS_IDX] = s_user_paths[D_LOGS_IDX] + MAIL_LOGS_DIR DIR_SEP;
s_user_paths[D_THEMES_IDX] = s_user_paths[D_USER_IDX] + THEMES_DIR DIR_SEP;
@@ -938,6 +940,8 @@ static void RebuildUserDirectories(unsigned int dir_index)
s_user_paths[D_DUMPDEBUG_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_DEBUG_DIR DIR_SEP;
s_user_paths[D_DUMPDEBUG_BRANCHWATCH_IDX] =
s_user_paths[D_DUMPDEBUG_IDX] + DUMP_DEBUG_BRANCHWATCH_DIR DIR_SEP;
+ s_user_paths[D_DUMPDEBUG_JITBLOCKS_IDX] =
+ s_user_paths[D_DUMPDEBUG_IDX] + DUMP_DEBUG_JITBLOCKS_DIR DIR_SEP;
s_user_paths[F_MEM1DUMP_IDX] = s_user_paths[D_DUMP_IDX] + MEM1_DUMP;
s_user_paths[F_MEM2DUMP_IDX] = s_user_paths[D_DUMP_IDX] + MEM2_DUMP;
s_user_paths[F_ARAMDUMP_IDX] = s_user_paths[D_DUMP_IDX] + ARAM_DUMP;
diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h
index 975ab55256..7d2d5e737a 100644
--- a/Source/Core/Common/FileUtil.h
+++ b/Source/Core/Common/FileUtil.h
@@ -54,6 +54,7 @@ enum
D_DUMPSSL_IDX,
D_DUMPDEBUG_IDX,
D_DUMPDEBUG_BRANCHWATCH_IDX,
+ D_DUMPDEBUG_JITBLOCKS_IDX,
D_LOAD_IDX,
D_LOGS_IDX,
D_MAILLOGS_IDX,
diff --git a/Source/Core/Common/PerformanceCounter.cpp b/Source/Core/Common/PerformanceCounter.cpp
deleted file mode 100644
index efe78e33db..0000000000
--- a/Source/Core/Common/PerformanceCounter.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 Dolphin Emulator Project
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#if !defined(_WIN32)
-#include "Common/PerformanceCounter.h"
-
-#include <cstdint>
-#include <ctime>
-
-#include <unistd.h>
-
-#include "Common/CommonTypes.h"
-
-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
-#if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0
-#define DOLPHIN_CLOCK CLOCK_MONOTONIC
-#else
-#define DOLPHIN_CLOCK CLOCK_REALTIME
-#endif
-#endif
-
-bool QueryPerformanceCounter(u64* out)
-{
-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
- timespec tp;
- if (clock_gettime(DOLPHIN_CLOCK, &tp))
- return false;
- *out = (u64)tp.tv_nsec + (u64)1000000000 * (u64)tp.tv_sec;
- return true;
-#else
- *out = 0;
- return false;
-#endif
-}
-
-bool QueryPerformanceFrequency(u64* out)
-{
-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
- *out = 1000000000;
- return true;
-#else
- *out = 1;
- return false;
-#endif
-}
-
-#endif
diff --git a/Source/Core/Common/PerformanceCounter.h b/Source/Core/Common/PerformanceCounter.h
deleted file mode 100644
index 080f40c6cf..0000000000
--- a/Source/Core/Common/PerformanceCounter.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 Dolphin Emulator Project
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#if !defined(_WIN32)
-
-#include <cstdint>
-
-#include "Common/CommonTypes.h"
-
-typedef u64 LARGE_INTEGER;
-bool QueryPerformanceCounter(u64* out);
-bool QueryPerformanceFrequency(u64* lpFrequency);
-
-#endif