--log_high_frequency_kernel_calls (defaults to false) to cull some lines.
This commit is contained in:
parent
3c1e012098
commit
311b65537d
|
@ -9,6 +9,9 @@
|
|||
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
|
||||
DEFINE_bool(log_high_frequency_kernel_calls, false,
|
||||
"Log kernel calls with the kHighFrequency tag.");
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
namespace shim {
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#ifndef XENIA_KERNEL_UTIL_SHIM_UTILS_H_
|
||||
#define XENIA_KERNEL_UTIL_SHIM_UTILS_H_
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
|
@ -20,6 +22,8 @@
|
|||
#include "xenia/cpu/frontend/ppc_context.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
|
||||
DECLARE_bool(log_high_frequency_kernel_calls);
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
@ -420,7 +424,9 @@ xe::cpu::Export* RegisterExport(R (*fn)(Ps&...), const char* name,
|
|||
ppc_context, sizeof...(Ps), 0,
|
||||
};
|
||||
auto params = std::make_tuple<Ps...>(Ps(init)...);
|
||||
if (export_entry->tags & ExportTag::kLog) {
|
||||
if (export_entry->tags & ExportTag::kLog &&
|
||||
(!(export_entry->tags & ExportTag::kHighFrequency) ||
|
||||
FLAGS_log_high_frequency_kernel_calls)) {
|
||||
PrintKernelCall(export_entry, params);
|
||||
}
|
||||
auto result =
|
||||
|
@ -450,7 +456,9 @@ xe::cpu::Export* RegisterExport(void (*fn)(Ps&...), const char* name,
|
|||
ppc_context, sizeof...(Ps),
|
||||
};
|
||||
auto params = std::make_tuple<Ps...>(Ps(init)...);
|
||||
if (export_entry->tags & ExportTag::kLog) {
|
||||
if (export_entry->tags & ExportTag::kLog &&
|
||||
(!(export_entry->tags & ExportTag::kHighFrequency) ||
|
||||
FLAGS_log_high_frequency_kernel_calls)) {
|
||||
PrintKernelCall(export_entry, params);
|
||||
}
|
||||
KernelTrampoline(FN, std::forward<std::tuple<Ps...>>(params),
|
||||
|
|
Loading…
Reference in New Issue