diff --git a/repos/dde_linux/src/lib/usb/raw/raw.cc b/repos/dde_linux/src/lib/usb/raw/raw.cc index 0e39b6a3bb..0c79d8bc1d 100644 --- a/repos/dde_linux/src/lib/usb/raw/raw.cc +++ b/repos/dde_linux/src/lib/usb/raw/raw.cc @@ -76,7 +76,7 @@ struct Device : List::Element static Genode::Reporter &device_list_reporter() { - static Genode::Reporter _r("devices", 512*1024); + static Genode::Reporter _r("devices", "devices", 512*1024); return _r; } diff --git a/repos/gems/src/test/decorator_stress/main.cc b/repos/gems/src/test/decorator_stress/main.cc index 4583eb4952..f47038fea4 100644 --- a/repos/gems/src/test/decorator_stress/main.cc +++ b/repos/gems/src/test/decorator_stress/main.cc @@ -76,7 +76,7 @@ int main(int argc, char **argv) { Param param(0, 1, 2, 3); - Genode::Reporter window_layout_reporter("window_layout", 10*4096); + Genode::Reporter window_layout_reporter("window_layout", "window_layout", 10*4096); window_layout_reporter.enabled(true); static Timer::Connection timer; diff --git a/repos/os/include/os/reporter.h b/repos/os/include/os/reporter.h index 4e5eb2704b..7ac5cf84f3 100644 --- a/repos/os/include/os/reporter.h +++ b/repos/os/include/os/reporter.h @@ -31,7 +31,8 @@ class Genode::Reporter : Noncopyable private: - Name const _name; + Name const _xml_name; + Name const _label; size_t const _buffer_size; @@ -60,8 +61,12 @@ class Genode::Reporter : Noncopyable public: - Reporter(char const *report_name, size_t buffer_size = 4096) - : _name(report_name), _buffer_size(buffer_size) { } + Reporter(char const *xml_name, char const *label = nullptr, + size_t buffer_size = 4096) + : + _xml_name(xml_name), _label(label ? label : xml_name), + _buffer_size(buffer_size) + { } /** * Enable or disable reporting @@ -71,7 +76,7 @@ class Genode::Reporter : Noncopyable if (enabled == _enabled) return; if (enabled) - _conn.construct(_name.string(), _buffer_size); + _conn.construct(_label.string(), _buffer_size); else _conn.destruct(); @@ -80,7 +85,7 @@ class Genode::Reporter : Noncopyable bool is_enabled() const { return _enabled; } - Name name() const { return _name; } + Name name() const { return _label; } /** * Clear report buffer @@ -114,7 +119,7 @@ class Genode::Reporter : Noncopyable : Genode::Xml_generator(reporter._base(), reporter._size(), - reporter._name.string(), + reporter._xml_name.string(), func) { reporter._conn->report.submit(used()); diff --git a/repos/os/src/app/trace_subject_reporter/main.cc b/repos/os/src/app/trace_subject_reporter/main.cc index e4a4f6a044..b33e6e5940 100644 --- a/repos/os/src/app/trace_subject_reporter/main.cc +++ b/repos/os/src/app/trace_subject_reporter/main.cc @@ -149,7 +149,7 @@ struct Server::Main Genode::Trace::Connection trace { 512*1024, 32*1024, 0 }; - Genode::Reporter reporter { "trace_subjects", 64*1024 }; + Genode::Reporter reporter { "trace_subjects", "trace_subjects", 64*1024 }; static unsigned long default_period_ms() { return 5000; } diff --git a/repos/os/src/drivers/acpi/acpi.cc b/repos/os/src/drivers/acpi/acpi.cc index e2ed12c674..1b8e261e2f 100644 --- a/repos/os/src/drivers/acpi/acpi.cc +++ b/repos/os/src/drivers/acpi/acpi.cc @@ -1262,7 +1262,7 @@ void Acpi::generate_report() init_acpi_table(); enum { REPORT_SIZE = 4 * 4096 }; - static Reporter acpi("acpi", REPORT_SIZE); + static Reporter acpi("acpi", "acpi", REPORT_SIZE); acpi.enabled(true); Genode::Reporter::Xml_generator xml(acpi, [&] () { diff --git a/repos/ports/src/test/vbox_pointer/main.cc b/repos/ports/src/test/vbox_pointer/main.cc index bed46deafb..0324254501 100644 --- a/repos/ports/src/test/vbox_pointer/main.cc +++ b/repos/ports/src/test/vbox_pointer/main.cc @@ -50,7 +50,7 @@ struct Shape struct Shape_report : Vbox_pointer::Shape_report { - Genode::Reporter reporter { "shape", sizeof(Vbox_pointer::Shape_report) }; + Genode::Reporter reporter { "shape", "shape", sizeof(Vbox_pointer::Shape_report) }; Shape_report() :