LibJS: Replace a few dbg() with dbgln()
This commit is contained in:
parent
123f98201e
commit
5de5af60c1
Notes:
sideshowbarker
2024-07-19 02:03:51 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/5de5af60c1f Pull-request: https://github.com/SerenityOS/serenity/pull/3681
3 changed files with 11 additions and 11 deletions
|
@ -285,14 +285,14 @@ void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measure
|
|||
int time_spent = measurement_timer.elapsed();
|
||||
|
||||
if (print_report) {
|
||||
dbg() << "Garbage collection report";
|
||||
dbg() << "=============================================";
|
||||
dbg() << " Time spent: " << time_spent << " ms";
|
||||
dbg() << " Live cells: " << live_cells << " (" << live_cell_bytes << " bytes)";
|
||||
dbg() << "Collected cells: " << collected_cells << " (" << collected_cell_bytes << " bytes)";
|
||||
dbg() << " Live blocks: " << m_blocks.size() << " (" << m_blocks.size() * HeapBlock::block_size << " bytes)";
|
||||
dbg() << " Freed blocks: " << empty_blocks.size() << " (" << empty_blocks.size() * HeapBlock::block_size << " bytes)";
|
||||
dbg() << "=============================================";
|
||||
dbgln("Garbage collection report");
|
||||
dbgln("=============================================");
|
||||
dbgln(" Time spent: {} ms", time_spent);
|
||||
dbgln(" Live cells: {} ({} bytes)", live_cells, live_cell_bytes);
|
||||
dbgln("Collected cells: {} ({} bytes)", collected_cells, collected_cell_bytes);
|
||||
dbgln(" Live blocks: {} ({} bytes)", m_blocks.size(), m_blocks.size() * HeapBlock::block_size);
|
||||
dbgln(" Freed blocks: {} ({} bytes)", empty_blocks.size(), empty_blocks.size() * HeapBlock::block_size);
|
||||
dbgln("=============================================");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ MarkupGenerator::StyleType MarkupGenerator::style_type_for_token(Token token)
|
|||
case TokenType::Identifier:
|
||||
return StyleType::Identifier;
|
||||
default:
|
||||
dbg() << "Unknown style type for token " << token.name();
|
||||
dbgln("Unknown style type for token {}", token.name());
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -255,13 +255,13 @@ void VM::throw_exception(Exception* exception)
|
|||
#ifdef VM_DEBUG
|
||||
if (exception->value().is_object() && exception->value().as_object().is_error()) {
|
||||
auto& error = static_cast<Error&>(exception->value().as_object());
|
||||
dbg() << "Throwing JavaScript Error: " << error.name() << ", " << error.message();
|
||||
dbgln("Throwing JavaScript Error: {}, {}", error.name(), error.message());
|
||||
|
||||
for (ssize_t i = m_call_stack.size() - 1; i >= 0; --i) {
|
||||
auto function_name = m_call_stack[i].function_name;
|
||||
if (function_name.is_empty())
|
||||
function_name = "<anonymous>";
|
||||
dbg() << " " << function_name;
|
||||
dbgln(" {}", function_name);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue