From 3dbe3982526627e295b4e4cdb4283d4cbb6fb8b1 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 7 Mar 2024 15:00:50 +0100 Subject: [PATCH] test-monitor: increase buffer size Issue #5137 --- repos/os/run/monitor.run | 4 ++-- repos/os/src/test/monitor/main.cc | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/repos/os/run/monitor.run b/repos/os/run/monitor.run index c53186fe35..1f5911d7f2 100644 --- a/repos/os/run/monitor.run +++ b/repos/os/run/monitor.run @@ -42,7 +42,7 @@ install_config { - + @@ -60,7 +60,7 @@ install_config { - + diff --git a/repos/os/src/test/monitor/main.cc b/repos/os/src/test/monitor/main.cc index ad4b550f31..c249d9ee96 100644 --- a/repos/os/src/test/monitor/main.cc +++ b/repos/os/src/test/monitor/main.cc @@ -124,17 +124,16 @@ struct Test::Main /* * Dimensioning of the buffer for one round trip: * - * The terminal_crosslink component uses a buffer of 4 KiB and - * the debug monitor limits the 'm' command response to 2 KiB to leave - * enough space for asynchronous notifications and protocol overhead. - * GDB's 'm' command encodes memory as hex, two characters per byte. - * Hence, a dump of max. 1 KiB is currently possible. - * * The most effective way to optimize the throughput would be to - * increase the terminal-crosslink's buffer size, reducing the number - * of round trips. + * increase the terminal-crosslink's buffer size and the maximum GDB + * response size of the debug monitor, reducing the number of round + * trips. + * + * GDB's 'm' command encodes memory as hex, two characters per byte. + * Hence, a dump of max. 1/2 of the configured GDB response size is + * possible. */ - char buffer[1024] { }; + char buffer[4096] { }; uint64_t const start_us = timer.elapsed_us(); uint64_t now_us = start_us;