From 104bb6c05dc8effef9db715f0b708d4548e10010 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 17 May 2013 21:47:10 -0300 Subject: ERS Report Redesign greatly enhances the ability to detect memory throughput More on it: http://hercules.ws/board/blog/1/entry-30-ers-report-update/ Signed-off-by: shennetsind --- src/common/db.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/common/db.c') diff --git a/src/common/db.c b/src/common/db.c index 7ac9b2dc7..f2e69abbb 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -2400,10 +2400,10 @@ DBReleaser db_custom_release(DBRelease which) * @see #DBMap_impl * @see #db_fix_options(DBType,DBOptions) */ -DBMap* db_alloc(const char *file, int line, DBType type, DBOptions options, unsigned short maxlen) -{ +DBMap* db_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) { DBMap_impl* db; unsigned int i; + char ers_name[50]; #ifdef DB_ENABLE_STATS DB_COUNTSTAT(db_alloc); @@ -2445,7 +2445,8 @@ DBMap* db_alloc(const char *file, int line, DBType type, DBOptions options, unsi db->free_max = 0; db->free_lock = 0; /* Other */ - db->nodes = ers_new(sizeof(struct dbn),"db.c::db_alloc",ERS_OPT_NONE); + snprintf(ers_name, 50, "db_alloc:nodes:%s:%s:%d",func,file,line); + db->nodes = ers_new(sizeof(struct dbn),ers_name,ERS_OPT_WAIT|ERS_OPT_FREE_NAME); db->cmp = db_default_cmp(type); db->hash = db_default_hash(type); db->release = db_default_release(type, options); -- cgit v1.2.3-60-g2f50