Browse Source
Merge pull request #7115 from ameerj/log-compile
common/logging: Reduce dependent header include overhead
pull/15/merge
bunnei
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with
53 additions and
18 deletions
-
src/audio_core/command_generator.cpp
-
src/audio_core/mix_context.cpp
-
src/audio_core/voice_context.cpp
-
src/common/CMakeLists.txt
-
src/common/logging/backend.cpp
-
src/common/logging/log.h
-
src/common/logging/log_entry.h
-
src/common/logging/text_formatter.cpp
-
src/common/logging/types.h
-
src/common/param_package.cpp
-
src/core/hle/kernel/k_auto_object_container.cpp
-
src/core/hle/service/lbl/lbl.cpp
-
src/core/hle/service/time/system_clock_context_update_callback.h
-
src/core/hle/service/time/system_clock_core.h
-
src/video_core/engines/maxwell_3d.h
|
|
@ -2,13 +2,16 @@ |
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Refer to the license.txt file included.
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
#include <cmath>
|
|
|
#include <cmath>
|
|
|
#include <numbers>
|
|
|
#include <numbers>
|
|
|
|
|
|
|
|
|
#include "audio_core/algorithm/interpolate.h"
|
|
|
#include "audio_core/algorithm/interpolate.h"
|
|
|
#include "audio_core/command_generator.h"
|
|
|
#include "audio_core/command_generator.h"
|
|
|
#include "audio_core/effect_context.h"
|
|
|
#include "audio_core/effect_context.h"
|
|
|
#include "audio_core/mix_context.h"
|
|
|
#include "audio_core/mix_context.h"
|
|
|
#include "audio_core/voice_context.h"
|
|
|
#include "audio_core/voice_context.h"
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
#include "core/memory.h"
|
|
|
#include "core/memory.h"
|
|
|
|
|
|
|
|
|
namespace AudioCore { |
|
|
namespace AudioCore { |
|
|
|
|
|
@ -2,6 +2,8 @@ |
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Refer to the license.txt file included.
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
#include "audio_core/behavior_info.h"
|
|
|
#include "audio_core/behavior_info.h"
|
|
|
#include "audio_core/common.h"
|
|
|
#include "audio_core/common.h"
|
|
|
#include "audio_core/effect_context.h"
|
|
|
#include "audio_core/effect_context.h"
|
|
|
|
|
|
@ -2,6 +2,8 @@ |
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Refer to the license.txt file included.
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
#include "audio_core/behavior_info.h"
|
|
|
#include "audio_core/behavior_info.h"
|
|
|
#include "audio_core/voice_context.h"
|
|
|
#include "audio_core/voice_context.h"
|
|
|
#include "core/memory.h"
|
|
|
#include "core/memory.h"
|
|
|
|
|
|
@ -79,6 +79,7 @@ add_library(common STATIC |
|
|
logging/filter.cpp |
|
|
logging/filter.cpp |
|
|
logging/filter.h |
|
|
logging/filter.h |
|
|
logging/log.h |
|
|
logging/log.h |
|
|
|
|
|
logging/log_entry.h |
|
|
logging/text_formatter.cpp |
|
|
logging/text_formatter.cpp |
|
|
logging/text_formatter.h |
|
|
logging/text_formatter.h |
|
|
logging/types.h |
|
|
logging/types.h |
|
|
|
|
|
@ -9,6 +9,8 @@ |
|
|
#include <thread>
|
|
|
#include <thread>
|
|
|
#include <vector>
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
#include <fmt/format.h>
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
#ifdef _WIN32
|
|
|
#include <windows.h> // For OutputDebugStringW
|
|
|
#include <windows.h> // For OutputDebugStringW
|
|
|
#endif
|
|
|
#endif
|
|
|
@ -22,6 +24,7 @@ |
|
|
|
|
|
|
|
|
#include "common/logging/backend.h"
|
|
|
#include "common/logging/backend.h"
|
|
|
#include "common/logging/log.h"
|
|
|
#include "common/logging/log.h"
|
|
|
|
|
|
#include "common/logging/log_entry.h"
|
|
|
#include "common/logging/text_formatter.h"
|
|
|
#include "common/logging/text_formatter.h"
|
|
|
#include "common/settings.h"
|
|
|
#include "common/settings.h"
|
|
|
#ifdef _WIN32
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
@ -4,7 +4,11 @@ |
|
|
|
|
|
|
|
|
#pragma once |
|
|
#pragma once |
|
|
|
|
|
|
|
|
#include <fmt/format.h> |
|
|
|
|
|
|
|
|
#include <algorithm> |
|
|
|
|
|
#include <string_view> |
|
|
|
|
|
|
|
|
|
|
|
#include <fmt/core.h> |
|
|
|
|
|
|
|
|
#include "common/logging/types.h" |
|
|
#include "common/logging/types.h" |
|
|
|
|
|
|
|
|
namespace Common::Log { |
|
|
namespace Common::Log { |
|
|
|
|
|
@ -0,0 +1,28 @@ |
|
|
|
|
|
// Copyright 2021 yuzu Emulator Project |
|
|
|
|
|
// Licensed under GPLv2 or any later version |
|
|
|
|
|
// Refer to the license.txt file included. |
|
|
|
|
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
|
#include <chrono> |
|
|
|
|
|
|
|
|
|
|
|
#include "common/logging/types.h" |
|
|
|
|
|
|
|
|
|
|
|
namespace Common::Log { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* A log entry. Log entries are store in a structured format to permit more varied output |
|
|
|
|
|
* formatting on different frontends, as well as facilitating filtering and aggregation. |
|
|
|
|
|
*/ |
|
|
|
|
|
struct Entry { |
|
|
|
|
|
std::chrono::microseconds timestamp; |
|
|
|
|
|
Class log_class{}; |
|
|
|
|
|
Level log_level{}; |
|
|
|
|
|
const char* filename = nullptr; |
|
|
|
|
|
unsigned int line_num = 0; |
|
|
|
|
|
std::string function; |
|
|
|
|
|
std::string message; |
|
|
|
|
|
bool final_entry = false; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
} // namespace Common::Log |
|
|
@ -13,6 +13,7 @@ |
|
|
#include "common/common_funcs.h"
|
|
|
#include "common/common_funcs.h"
|
|
|
#include "common/logging/filter.h"
|
|
|
#include "common/logging/filter.h"
|
|
|
#include "common/logging/log.h"
|
|
|
#include "common/logging/log.h"
|
|
|
|
|
|
#include "common/logging/log_entry.h"
|
|
|
#include "common/logging/text_formatter.h"
|
|
|
#include "common/logging/text_formatter.h"
|
|
|
#include "common/string_util.h"
|
|
|
#include "common/string_util.h"
|
|
|
|
|
|
|
|
|
|
|
|
@ -4,8 +4,6 @@ |
|
|
|
|
|
|
|
|
#pragma once |
|
|
#pragma once |
|
|
|
|
|
|
|
|
#include <chrono> |
|
|
|
|
|
|
|
|
|
|
|
#include "common/common_types.h" |
|
|
#include "common/common_types.h" |
|
|
|
|
|
|
|
|
namespace Common::Log { |
|
|
namespace Common::Log { |
|
|
@ -131,19 +129,4 @@ enum class Class : u8 { |
|
|
Count ///< Total number of logging classes |
|
|
Count ///< Total number of logging classes |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* A log entry. Log entries are store in a structured format to permit more varied output |
|
|
|
|
|
* formatting on different frontends, as well as facilitating filtering and aggregation. |
|
|
|
|
|
*/ |
|
|
|
|
|
struct Entry { |
|
|
|
|
|
std::chrono::microseconds timestamp; |
|
|
|
|
|
Class log_class{}; |
|
|
|
|
|
Level log_level{}; |
|
|
|
|
|
const char* filename = nullptr; |
|
|
|
|
|
unsigned int line_num = 0; |
|
|
|
|
|
std::string function; |
|
|
|
|
|
std::string message; |
|
|
|
|
|
bool final_entry = false; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
} // namespace Common::Log |
|
|
} // namespace Common::Log |
|
|
@ -3,6 +3,7 @@ |
|
|
// Refer to the license.txt file included.
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
#include <array>
|
|
|
#include <array>
|
|
|
|
|
|
#include <stdexcept>
|
|
|
#include <utility>
|
|
|
#include <utility>
|
|
|
#include <vector>
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
@ -2,6 +2,8 @@ |
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Refer to the license.txt file included.
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
#include "core/hle/kernel/k_auto_object_container.h"
|
|
|
#include "core/hle/kernel/k_auto_object_container.h"
|
|
|
|
|
|
|
|
|
namespace Kernel { |
|
|
namespace Kernel { |
|
|
|
|
|
@ -2,6 +2,7 @@ |
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Refer to the license.txt file included.
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
|
|
#include <cmath>
|
|
|
#include <memory>
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
#include "common/logging/log.h"
|
|
|
#include "common/logging/log.h"
|
|
|
|
|
|
@ -4,6 +4,7 @@ |
|
|
|
|
|
|
|
|
#pragma once |
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
|
#include <memory> |
|
|
#include <vector> |
|
|
#include <vector> |
|
|
|
|
|
|
|
|
#include "core/hle/service/time/clock_types.h" |
|
|
#include "core/hle/service/time/clock_types.h" |
|
|
|
|
|
@ -4,6 +4,8 @@ |
|
|
|
|
|
|
|
|
#pragma once |
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
|
#include <memory> |
|
|
|
|
|
|
|
|
#include "common/common_types.h" |
|
|
#include "common/common_types.h" |
|
|
#include "core/hle/service/time/clock_types.h" |
|
|
#include "core/hle/service/time/clock_types.h" |
|
|
|
|
|
|
|
|
|
|
|
@ -6,6 +6,7 @@ |
|
|
|
|
|
|
|
|
#include <array> |
|
|
#include <array> |
|
|
#include <bitset> |
|
|
#include <bitset> |
|
|
|
|
|
#include <cmath> |
|
|
#include <limits> |
|
|
#include <limits> |
|
|
#include <optional> |
|
|
#include <optional> |
|
|
#include <type_traits> |
|
|
#include <type_traits> |
|
|
|