[ovs-dev] [PATCH 3/5] ovsdb: perf counters
William Tu
u9012063 at gmail.com
Fri Dec 11 01:58:14 UTC 2015
perf counters are used by ovsdb_txn_commit(), which can be called while
opening a database file. This means we have to move the call to
perf_counters_init() before. Failed cases of Valgrind: 104, 106, 107
Signed-off-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Co-authored-by: Daniele Di Proietto <diproiettod at vmware.com>
---
ovsdb/ovsdb-server.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
index 97b65b6..e14a644 100644
--- a/ovsdb/ovsdb-server.c
+++ b/ovsdb/ovsdb-server.c
@@ -258,6 +258,9 @@ main(int argc, char *argv[])
shash_init(&all_dbs);
server_config.all_dbs = &all_dbs;
server_config.jsonrpc = jsonrpc;
+
+ perf_counters_init();
+
SSET_FOR_EACH (db_filename, &db_filenames) {
error = open_db(&server_config, db_filename);
if (error) {
@@ -296,8 +299,6 @@ main(int argc, char *argv[])
daemonize_complete();
- perf_counters_init();
-
if (!run_command) {
/* ovsdb-server is usually a long-running process, in which case it
* makes plenty of sense to log the version, but --run makes
--
2.5.0
More information about the dev
mailing list