Merge pull request #26217 from bluca/dump_mem
Add D-Bus method and analyze command to dump malloc_info()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user