Merge pull request #26217 from bluca/dump_mem

Add D-Bus method and analyze command to dump malloc_info()
This commit is contained in:
Luca Boccassi
2023-02-24 10:31:21 +00:00
committed by GitHub
11 changed files with 177 additions and 15 deletions
+8
View File
@@ -737,6 +737,10 @@ static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void
return 0;
}
r = bus_register_malloc_status(bus, "org.freedesktop.systemd1");
if (r < 0)
log_warning_errno(r, "Failed to register MemoryAllocation1, ignoring: %m");
r = set_ensure_put(&m->private_buses, NULL, bus);
if (r == -ENOMEM) {
log_oom();
@@ -798,6 +802,10 @@ static int bus_setup_api(Manager *m, sd_bus *bus) {
if (r < 0)
return log_error_errno(r, "Failed to request name: %m");
r = bus_register_malloc_status(bus, "org.freedesktop.systemd1");
if (r < 0)
log_warning_errno(r, "Failed to register MemoryAllocation1, ignoring: %m");
log_debug("Successfully connected to API bus.");
return 0;