Add support for tracking and logging daemon memory usage.
[openvswitch] / vswitchd / bridge.c
index 0c78f946cfca1a211b53681435d90caa905dd8be..d72095207d1f573b57bea53158baa26dbe4daab1 100644 (file)
@@ -2228,6 +2228,18 @@ bridge_wait(void)
         }
     }
 }
+
+/* Adds some memory usage statistics for bridges into 'usage', for use with
+ * memory_report(). */
+void
+bridge_get_memory_usage(struct simap *usage)
+{
+    struct bridge *br;
+
+    HMAP_FOR_EACH (br, node, &all_bridges) {
+        ofproto_get_memory_usage(br->ofproto, usage);
+    }
+}
 \f
 /* QoS unixctl user interface functions. */