Code-review fixes

This commit is contained in:
Nemoumbra 2024-09-16 02:48:52 +03:00
parent 08b20ce9c8
commit bd6c469543
4 changed files with 9 additions and 9 deletions

View File

@ -190,7 +190,7 @@ static const IRMeta irMeta[] = {
{ IROp::ApplyRoundingMode, "ApplyRoundingMode", "" },
{ IROp::UpdateRoundingMode, "UpdateRoundingMode", "" },
{IROp::LogIRBlock, "LogIRBlock", ""}
{ IROp::LogIRBlock, "LogIRBlock", "" },
};
const IRMeta *metaIndex[256];

View File

@ -57,7 +57,7 @@ void TraceBlockStorage::clear() {
INFO_LOG(Log::JIT, "TraceBlockStorage cleared");
}
void MIPSTracer::prepare_block(MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks) {
void MIPSTracer::prepare_block(const MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks) {
u32 virt_addr, size;
block->GetRange(&virt_addr, &size);
@ -120,7 +120,7 @@ bool MIPSTracer::flush_to_file() {
return true;
}
void MIPSTracer::flush_block_to_file(TraceBlockInfo& block_info) {
void MIPSTracer::flush_block_to_file(const TraceBlockInfo& block_info) {
char buffer[512];
// The log format is '{prefix}{disassembled line}', where 'prefix' is '0x{8 hex digits of the address}: '

View File

@ -144,16 +144,16 @@ struct MIPSTracer {
void start_tracing();
void stop_tracing();
void prepare_block(MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks);
void setLoggingPath(std::string path) {
void prepare_block(const MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks);
void set_logging_path(std::string path) {
logging_path = Path(path);
}
std::string getLoggingPath() const {
std::string get_logging_path() const {
return logging_path.ToString();
}
bool flush_to_file();
void flush_block_to_file(TraceBlockInfo& block);
void flush_block_to_file(const TraceBlockInfo& block);
void initialize(u32 storage_capacity, u32 max_trace_size);
void clear();

View File

@ -1909,7 +1909,7 @@ void DeveloperToolsScreen::CreateViews() {
return true;
});
MIPSTracerPath_ = mipsTracer.getLoggingPath();
MIPSTracerPath_ = mipsTracer.get_logging_path();
MIPSTracerPath = list->Add(new InfoItem(dev->T("Current log file"), MIPSTracerPath_));
PopupSliderChoice* storage_capacity = list->Add(
@ -2151,7 +2151,7 @@ UI::EventReturn DeveloperToolsScreen::OnMIPSTracerPathChanged(UI::EventParams &e
auto dev = GetI18NCategory(I18NCat::DEVELOPER);
System_BrowseForFile(GetRequesterToken(), dev->T("Select the log file"), BrowseFileType::ANY,
[this](const std::string &value, int) {
mipsTracer.setLoggingPath(value);
mipsTracer.set_logging_path(value);
MIPSTracerPath_ = value;
MIPSTracerPath->SetRightText(MIPSTracerPath_);
});