소스 검색

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.Everything:
asynts 4 년 전
부모
커밋
872f2a3b90

+ 1 - 1
Kernel/Arch/i386/CPU.h

@@ -591,7 +591,7 @@ public:
         SplitQword end;
         SplitQword end;
         read_tsc(end.lsw, end.msw);
         read_tsc(end.lsw, end.msw);
         uint64_t diff = end.qw - m_start.qw;
         uint64_t diff = end.qw - m_start.qw;
-        dbg() << "Stopwatch(" << m_name << "): " << diff << " ticks";
+        dbgln("Stopwatch({}): {} ticks", m_name, diff);
     }
     }
 
 
 private:
 private:

+ 6 - 6
Kernel/Devices/BlockDevice.cpp

@@ -55,13 +55,13 @@ bool BlockDevice::read_block(unsigned index, UserOrKernelBuffer& buffer)
     case AsyncDeviceRequest::Success:
     case AsyncDeviceRequest::Success:
         return true;
         return true;
     case AsyncDeviceRequest::Failure:
     case AsyncDeviceRequest::Failure:
-        dbg() << "BlockDevice::read_block(" << index << ") IO error";
+        dbgln("BlockDevice::read_block({}) IO error", index);
         break;
         break;
     case AsyncDeviceRequest::MemoryFault:
     case AsyncDeviceRequest::MemoryFault:
-        dbg() << "BlockDevice::read_block(" << index << ") EFAULT";
+        dbgln("BlockDevice::read_block({}) EFAULT", index);
         break;
         break;
     case AsyncDeviceRequest::Cancelled:
     case AsyncDeviceRequest::Cancelled:
-        dbg() << "BlockDevice::read_block(" << index << ") cancelled";
+        dbgln("BlockDevice::read_block({}) cancelled", index);
         break;
         break;
     default:
     default:
         ASSERT_NOT_REACHED();
         ASSERT_NOT_REACHED();
@@ -76,13 +76,13 @@ bool BlockDevice::write_block(unsigned index, const UserOrKernelBuffer& buffer)
     case AsyncDeviceRequest::Success:
     case AsyncDeviceRequest::Success:
         return true;
         return true;
     case AsyncDeviceRequest::Failure:
     case AsyncDeviceRequest::Failure:
-        dbg() << "BlockDevice::write_block(" << index << ") IO error";
+        dbgln("BlockDevice::write_block({}) IO error", index);
         break;
         break;
     case AsyncDeviceRequest::MemoryFault:
     case AsyncDeviceRequest::MemoryFault:
-        dbg() << "BlockDevice::write_block(" << index << ") EFAULT";
+        dbgln("BlockDevice::write_block({}) EFAULT", index);
         break;
         break;
     case AsyncDeviceRequest::Cancelled:
     case AsyncDeviceRequest::Cancelled:
-        dbg() << "BlockDevice::write_block(" << index << ") cancelled";
+        dbgln("BlockDevice::write_block({}) cancelled", index);
         break;
         break;
     default:
     default:
         ASSERT_NOT_REACHED();
         ASSERT_NOT_REACHED();

+ 1 - 1
Kernel/Devices/Device.cpp

@@ -59,7 +59,7 @@ Device::Device(unsigned major, unsigned minor)
     u32 device_id = encoded_device(major, minor);
     u32 device_id = encoded_device(major, minor);
     auto it = all_devices().find(device_id);
     auto it = all_devices().find(device_id);
     if (it != all_devices().end()) {
     if (it != all_devices().end()) {
-        dbg() << "Already registered " << major << "," << minor << ": " << it->value->class_name();
+        dbgln("Already registered {},{}: {}", major, minor, it->value->class_name());
     }
     }
     ASSERT(!all_devices().contains(device_id));
     ASSERT(!all_devices().contains(device_id));
     all_devices().set(device_id, this);
     all_devices().set(device_id, this);

+ 2 - 1
Kernel/Devices/I8042Controller.cpp

@@ -67,7 +67,8 @@ I8042Controller::I8042Controller()
         do_wait_then_write(I8042_BUFFER, configuration);
         do_wait_then_write(I8042_BUFFER, configuration);
 
 
         m_is_dual_channel = (configuration & (1 << 5)) != 0;
         m_is_dual_channel = (configuration & (1 << 5)) != 0;
-        dbg() << "I8042: " << (m_is_dual_channel ? "Dual" : "Single") << " channel controller";
+        dbgln("I8042: {} channel controller",
+            m_is_dual_channel ? "Dual" : "Single");
 
 
         // Perform controller self-test
         // Perform controller self-test
         do_wait_then_write(I8042_STATUS, 0xaa);
         do_wait_then_write(I8042_STATUS, 0xaa);

+ 1 - 1
Kernel/Devices/KeyboardDevice.cpp

@@ -408,7 +408,7 @@ void KeyboardDevice::set_maps(const Keyboard::CharacterMapData& character_map_da
 {
 {
     m_character_map.set_character_map_data(character_map_data);
     m_character_map.set_character_map_data(character_map_data);
     m_character_map.set_character_map_name(character_map_name);
     m_character_map.set_character_map_name(character_map_name);
-    dbg() << "New Character map \"" << character_map_name << "\" passing to client.";
+    dbgln("New Character map '{}' passing to client.", character_map_name);
 }
 }
 
 
 }
 }

+ 2 - 2
Kernel/Devices/MBVGADevice.cpp

@@ -47,7 +47,7 @@ MBVGADevice::MBVGADevice(PhysicalAddress addr, size_t pitch, size_t width, size_
     , m_framebuffer_width(width)
     , m_framebuffer_width(width)
     , m_framebuffer_height(height)
     , m_framebuffer_height(height)
 {
 {
-    dbg() << "MBVGADevice address=" << addr << ", pitch=" << pitch << ", width=" << width << ", height=" << height;
+    dbgln("MBVGADevice address={}, pitch={}, width={}, height={}", addr, pitch, width, height);
     s_the = this;
     s_the = this;
 }
 }
 
 
@@ -71,7 +71,7 @@ KResultOr<Region*> MBVGADevice::mmap(Process& process, FileDescription&, Virtual
         shared);
         shared);
     if (!region)
     if (!region)
         return KResult(-ENOMEM);
         return KResult(-ENOMEM);
-    dbg() << "MBVGADevice: mmap with size " << region->size() << " at " << region->vaddr();
+    dbgln("MBVGADevice: mmap with size {} at {}", region->size(), region->vaddr());
     return region;
     return region;
 }
 }
 
 

+ 2 - 2
Kernel/Devices/PS2MouseDevice.cpp

@@ -203,7 +203,7 @@ u8 PS2MouseDevice::send_command(u8 command)
 {
 {
     u8 response = m_controller.send_command(I8042Controller::Device::Mouse, command);
     u8 response = m_controller.send_command(I8042Controller::Device::Mouse, command);
     if (response != I8042_ACK)
     if (response != I8042_ACK)
-        dbg() << "PS2MouseDevice: Command " << (int)command << " got " << (int)response << " but expected ack: " << (int)I8042_ACK;
+        dbgln("PS2MouseDevice: Command {} got {} but expected ack: {}", command, response, I8042_ACK);
     return response;
     return response;
 }
 }
 
 
@@ -211,7 +211,7 @@ u8 PS2MouseDevice::send_command(u8 command, u8 data)
 {
 {
     u8 response = m_controller.send_command(I8042Controller::Device::Mouse, command, data);
     u8 response = m_controller.send_command(I8042Controller::Device::Mouse, command, data);
     if (response != I8042_ACK)
     if (response != I8042_ACK)
-        dbg() << "PS2MouseDevice: Command " << (int)command << " got " << (int)response << " but expected ack: " << (int)I8042_ACK;
+        dbgln("PS2MouseDevice: Command {} got {} but expected ack: {}", command, response, I8042_ACK);
     return response;
     return response;
 }
 }
 
 

+ 1 - 1
Kernel/FileSystem/BlockBasedFileSystem.cpp

@@ -315,7 +315,7 @@ void BlockBasedFS::flush_writes_impl()
         ++count;
         ++count;
     });
     });
     cache().mark_all_clean();
     cache().mark_all_clean();
-    dbg() << class_name() << ": Flushed " << count << " blocks to disk";
+    dbgln("{}: Flushed {} blocks to disk", class_name(), count);
 }
 }
 
 
 void BlockBasedFS::flush_writes()
 void BlockBasedFS::flush_writes()