diff options
| author | 2018-09-04 11:02:59 +0200 | |
|---|---|---|
| committer | 2018-09-04 11:04:26 +0200 | |
| commit | 10bc725944d41f09ae1425aa1eb8acffcae0a091 (patch) | |
| tree | 794211794cccdc2c23431a64ab76f7789623cf41 /src | |
| parent | Merge pull request #1231 from lioncash/global (diff) | |
| download | yuzu-10bc725944d41f09ae1425aa1eb8acffcae0a091.tar.gz yuzu-10bc725944d41f09ae1425aa1eb8acffcae0a091.tar.xz yuzu-10bc725944d41f09ae1425aa1eb8acffcae0a091.zip | |
Update microprofile scopes.
Blame the subsystems which deserve the blame :)
The updated list is not complete, just the ones I've spotted on random sampling the stack trace.
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/stream.cpp | 4 | ||||
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 4 | ||||
| -rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 |
4 files changed, 21 insertions, 5 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index ad9e2915c..dbae75d8c 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include "audio_core/stream.h" | 10 | #include "audio_core/stream.h" |
| 11 | #include "common/assert.h" | 11 | #include "common/assert.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/microprofile.h" | ||
| 13 | #include "core/core_timing.h" | 14 | #include "core/core_timing.h" |
| 14 | #include "core/core_timing_util.h" | 15 | #include "core/core_timing_util.h" |
| 15 | #include "core/settings.h" | 16 | #include "core/settings.h" |
| @@ -94,7 +95,10 @@ void Stream::PlayNextBuffer() { | |||
| 94 | CoreTiming::ScheduleEventThreadsafe(GetBufferReleaseCycles(*active_buffer), release_event, {}); | 95 | CoreTiming::ScheduleEventThreadsafe(GetBufferReleaseCycles(*active_buffer), release_event, {}); |
| 95 | } | 96 | } |
| 96 | 97 | ||
| 98 | MICROPROFILE_DEFINE(AudioOutput, "Audio", "ReleaseActiveBuffer", MP_RGB(100, 100, 255)); | ||
| 99 | |||
| 97 | void Stream::ReleaseActiveBuffer() { | 100 | void Stream::ReleaseActiveBuffer() { |
| 101 | MICROPROFILE_SCOPE(AudioOutput); | ||
| 98 | ASSERT(active_buffer); | 102 | ASSERT(active_buffer); |
| 99 | released_buffers.push(std::move(active_buffer)); | 103 | released_buffers.push(std::move(active_buffer)); |
| 100 | release_callback(); | 104 | release_callback(); |
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index de44ccebd..b47f04988 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <dynarmic/A64/a64.h> | 7 | #include <dynarmic/A64/a64.h> |
| 8 | #include <dynarmic/A64/config.h> | 8 | #include <dynarmic/A64/config.h> |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "common/microprofile.h" | ||
| 10 | #include "core/arm/dynarmic/arm_dynarmic.h" | 11 | #include "core/arm/dynarmic/arm_dynarmic.h" |
| 11 | #include "core/core.h" | 12 | #include "core/core.h" |
| 12 | #include "core/core_cpu.h" | 13 | #include "core/core_cpu.h" |
| @@ -143,7 +144,10 @@ std::unique_ptr<Dynarmic::A64::Jit> ARM_Dynarmic::MakeJit() const { | |||
| 143 | return std::make_unique<Dynarmic::A64::Jit>(config); | 144 | return std::make_unique<Dynarmic::A64::Jit>(config); |
| 144 | } | 145 | } |
| 145 | 146 | ||
| 147 | MICROPROFILE_DEFINE(ARM_Jit_Dynarmic, "ARM JIT", "Dynarmic", MP_RGB(255, 64, 64)); | ||
| 148 | |||
| 146 | void ARM_Dynarmic::Run() { | 149 | void ARM_Dynarmic::Run() { |
| 150 | MICROPROFILE_SCOPE(ARM_Jit_Dynarmic); | ||
| 147 | ASSERT(Memory::GetCurrentPageTable() == current_page_table); | 151 | ASSERT(Memory::GetCurrentPageTable() == current_page_table); |
| 148 | 152 | ||
| 149 | jit->Run(); | 153 | jit->Run(); |
diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index 307f12198..4c4de2623 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp | |||
| @@ -193,10 +193,10 @@ void ARM_Unicorn::Step() { | |||
| 193 | ExecuteInstructions(1); | 193 | ExecuteInstructions(1); |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64)); | 196 | MICROPROFILE_DEFINE(ARM_Jit_Unicorn, "ARM JIT", "Unicorn", MP_RGB(255, 64, 64)); |
| 197 | 197 | ||
| 198 | void ARM_Unicorn::ExecuteInstructions(int num_instructions) { | 198 | void ARM_Unicorn::ExecuteInstructions(int num_instructions) { |
| 199 | MICROPROFILE_SCOPE(ARM_Jit); | 199 | MICROPROFILE_SCOPE(ARM_Jit_Unicorn); |
| 200 | CHECKED(uc_emu_start(uc, GetPC(), 1ULL << 63, 0, num_instructions)); | 200 | CHECKED(uc_emu_start(uc, GetPC(), 1ULL << 63, 0, num_instructions)); |
| 201 | CoreTiming::AddTicks(num_instructions); | 201 | CoreTiming::AddTicks(num_instructions); |
| 202 | if (GDBStub::IsServerEnabled()) { | 202 | if (GDBStub::IsServerEnabled()) { |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 7ce969f73..e260c9140 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -33,10 +33,13 @@ using PixelFormat = SurfaceParams::PixelFormat; | |||
| 33 | using SurfaceType = SurfaceParams::SurfaceType; | 33 | using SurfaceType = SurfaceParams::SurfaceType; |
| 34 | 34 | ||
| 35 | MICROPROFILE_DEFINE(OpenGL_VAO, "OpenGL", "Vertex Array Setup", MP_RGB(128, 128, 192)); | 35 | MICROPROFILE_DEFINE(OpenGL_VAO, "OpenGL", "Vertex Array Setup", MP_RGB(128, 128, 192)); |
| 36 | MICROPROFILE_DEFINE(OpenGL_VS, "OpenGL", "Vertex Shader Setup", MP_RGB(128, 128, 192)); | 36 | MICROPROFILE_DEFINE(OpenGL_Shader, "OpenGL", "Shader Setup", MP_RGB(128, 128, 192)); |
| 37 | MICROPROFILE_DEFINE(OpenGL_FS, "OpenGL", "Fragment Shader Setup", MP_RGB(128, 128, 192)); | 37 | MICROPROFILE_DEFINE(OpenGL_UBO, "OpenGL", "Const Buffer Setup", MP_RGB(128, 128, 192)); |
| 38 | MICROPROFILE_DEFINE(OpenGL_Index, "OpenGL", "Index Buffer Setup", MP_RGB(128, 128, 192)); | ||
| 39 | MICROPROFILE_DEFINE(OpenGL_Texture, "OpenGL", "Texture Setup", MP_RGB(128, 128, 192)); | ||
| 40 | MICROPROFILE_DEFINE(OpenGL_Framebuffer, "OpenGL", "Framebuffer Setup", MP_RGB(128, 128, 192)); | ||
| 38 | MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192)); | 41 | MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192)); |
| 39 | MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(100, 100, 255)); | 42 | MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(128, 128, 192)); |
| 40 | MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100)); | 43 | MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100)); |
| 41 | 44 | ||
| 42 | RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& window, ScreenInfo& info) | 45 | RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& window, ScreenInfo& info) |
| @@ -179,6 +182,7 @@ std::pair<u8*, GLintptr> RasterizerOpenGL::SetupVertexArrays(u8* array_ptr, | |||
| 179 | } | 182 | } |
| 180 | 183 | ||
| 181 | std::pair<u8*, GLintptr> RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { | 184 | std::pair<u8*, GLintptr> RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { |
| 185 | MICROPROFILE_SCOPE(OpenGL_Shader); | ||
| 182 | auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); | 186 | auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); |
| 183 | 187 | ||
| 184 | // Next available bindpoints to use when uploading the const buffers and textures to the GLSL | 188 | // Next available bindpoints to use when uploading the const buffers and textures to the GLSL |
| @@ -312,6 +316,7 @@ void RasterizerOpenGL::UpdatePagesCachedCount(VAddr addr, u64 size, int delta) { | |||
| 312 | std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_color_fb, | 316 | std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_color_fb, |
| 313 | bool using_depth_fb, | 317 | bool using_depth_fb, |
| 314 | bool preserve_contents) { | 318 | bool preserve_contents) { |
| 319 | MICROPROFILE_SCOPE(OpenGL_Framebuffer); | ||
| 315 | const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; | 320 | const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; |
| 316 | 321 | ||
| 317 | if (regs.rt[0].format == Tegra::RenderTargetFormat::NONE) { | 322 | if (regs.rt[0].format == Tegra::RenderTargetFormat::NONE) { |
| @@ -512,6 +517,7 @@ void RasterizerOpenGL::DrawArrays() { | |||
| 512 | // If indexed mode, copy the index buffer | 517 | // If indexed mode, copy the index buffer |
| 513 | GLintptr index_buffer_offset = 0; | 518 | GLintptr index_buffer_offset = 0; |
| 514 | if (is_indexed) { | 519 | if (is_indexed) { |
| 520 | MICROPROFILE_SCOPE(OpenGL_Index); | ||
| 515 | std::tie(buffer_ptr, buffer_offset, index_buffer_offset) = UploadMemory( | 521 | std::tie(buffer_ptr, buffer_offset, index_buffer_offset) = UploadMemory( |
| 516 | buffer_ptr, buffer_offset, regs.index_array.StartAddress(), index_buffer_size); | 522 | buffer_ptr, buffer_offset, regs.index_array.StartAddress(), index_buffer_size); |
| 517 | } | 523 | } |
| @@ -657,6 +663,7 @@ std::tuple<u8*, GLintptr, u32> RasterizerOpenGL::SetupConstBuffers(u8* buffer_pt | |||
| 657 | Maxwell::ShaderStage stage, | 663 | Maxwell::ShaderStage stage, |
| 658 | Shader& shader, | 664 | Shader& shader, |
| 659 | u32 current_bindpoint) { | 665 | u32 current_bindpoint) { |
| 666 | MICROPROFILE_SCOPE(OpenGL_UBO); | ||
| 660 | const auto& gpu = Core::System::GetInstance().GPU(); | 667 | const auto& gpu = Core::System::GetInstance().GPU(); |
| 661 | const auto& maxwell3d = gpu.Maxwell3D(); | 668 | const auto& maxwell3d = gpu.Maxwell3D(); |
| 662 | const auto& shader_stage = maxwell3d.state.shader_stages[static_cast<size_t>(stage)]; | 669 | const auto& shader_stage = maxwell3d.state.shader_stages[static_cast<size_t>(stage)]; |
| @@ -712,6 +719,7 @@ std::tuple<u8*, GLintptr, u32> RasterizerOpenGL::SetupConstBuffers(u8* buffer_pt | |||
| 712 | } | 719 | } |
| 713 | 720 | ||
| 714 | u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, Shader& shader, u32 current_unit) { | 721 | u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, Shader& shader, u32 current_unit) { |
| 722 | MICROPROFILE_SCOPE(OpenGL_Texture); | ||
| 715 | const auto& gpu = Core::System::GetInstance().GPU(); | 723 | const auto& gpu = Core::System::GetInstance().GPU(); |
| 716 | const auto& maxwell3d = gpu.Maxwell3D(); | 724 | const auto& maxwell3d = gpu.Maxwell3D(); |
| 717 | const auto& entries = shader->GetShaderEntries().texture_samplers; | 725 | const auto& entries = shader->GetShaderEntries().texture_samplers; |