diff options
author | shennetsind <ind@henn.et> | 2013-05-17 21:47:10 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-17 21:47:10 -0300 |
commit | 104bb6c05dc8effef9db715f0b708d4548e10010 (patch) | |
tree | da8cfebada8a4345cee998713679db54eafffd84 /src/common/db.c | |
parent | 4ef9258f0f618857ed5d9e2f9e07f33dc6d13559 (diff) | |
download | hercules-104bb6c05dc8effef9db715f0b708d4548e10010.tar.gz hercules-104bb6c05dc8effef9db715f0b708d4548e10010.tar.bz2 hercules-104bb6c05dc8effef9db715f0b708d4548e10010.tar.xz hercules-104bb6c05dc8effef9db715f0b708d4548e10010.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/common/db.c')
-rw-r--r-- | src/common/db.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); |