kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
November 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
27 participants
315 discussions
Start a n
N
ew thread
git:master:ec88a0e5: mem: tlsf_malloc extended for per module memory stats
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ec88a0e5a2115e7063048d519ecbce8aacd9846e URL:
https://github.com/kamailio/kamailio/commit/ec88a0e5a2115e7063048d519ecbce8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:49:04+01:00 mem: tlsf_malloc extended for per module memory stats --- Modified: mem/tlsf_malloc.c Modified: mem/tlsf_malloc.h --- Diff:
https://github.com/kamailio/kamailio/commit/ec88a0e5a2115e7063048d519ecbce8…
Patch:
https://github.com/kamailio/kamailio/commit/ec88a0e5a2115e7063048d519ecbce8…
9 years, 1 month
1
0
0
0
git:master:08e62438: mem: q_malloc extended for per module memory stats
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 08e62438a3c824f2023164dba602313e83dc2fac URL:
https://github.com/kamailio/kamailio/commit/08e62438a3c824f2023164dba602313…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:48:54+01:00 mem: q_malloc extended for per module memory stats --- Modified: mem/q_malloc.c Modified: mem/q_malloc.h --- Diff:
https://github.com/kamailio/kamailio/commit/08e62438a3c824f2023164dba602313…
Patch:
https://github.com/kamailio/kamailio/commit/08e62438a3c824f2023164dba602313…
9 years, 1 month
1
0
0
0
git:master:1755c1b7: core: mem - shm common defines to pass the module name
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 1755c1b7d60327b43ec5fa4ee4d3d309c23dc223 URL:
https://github.com/kamailio/kamailio/commit/1755c1b7d60327b43ec5fa4ee4d3d30…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:47:26+01:00 core: mem - shm common defines to pass the module name --- Modified: mem/shm_mem.c Modified: mem/shm_mem.h --- Diff:
https://github.com/kamailio/kamailio/commit/1755c1b7d60327b43ec5fa4ee4d3d30…
Patch:
https://github.com/kamailio/kamailio/commit/1755c1b7d60327b43ec5fa4ee4d3d30…
--- diff --git a/mem/shm_mem.c b/mem/shm_mem.c index 8395cfd..f2800b0 100644 --- a/mem/shm_mem.c +++ b/mem/shm_mem.c @@ -94,7 +94,7 @@ inline static void* sh_realloc(void* p, unsigned int size) #ifdef DBG_QM_MALLOC void* _shm_resize( void* p, unsigned int s, const char* file, const char* func, - int line) + int line, const char *mname) #else void* _shm_resize( void* p , unsigned int s) #endif diff --git a/mem/shm_mem.h b/mem/shm_mem.h index 35d6503..f170bd9 100644 --- a/mem/shm_mem.h +++ b/mem/shm_mem.h @@ -211,41 +211,41 @@ void shm_mem_destroy(void); #include "src_loc.h" #define shm_malloc_unsafe(_size ) \ - MY_MALLOC(shm_block, (_size), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ ) + MY_MALLOC(shm_block, (_size), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) inline static void* _shm_malloc(unsigned int size, - const char *file, const char *function, int line ) + const char *file, const char *function, int line, const char *mname) { void *p; shm_lock(); - p=MY_MALLOC(shm_block, size, file, function, line ); + p=MY_MALLOC(shm_block, size, file, function, line, mname); shm_unlock(); return p; } inline static void* _shm_realloc(void *ptr, unsigned int size, - const char* file, const char* function, int line ) + const char* file, const char* function, int line, const char *mname) { void *p; shm_lock(); - p=MY_REALLOC(shm_block, ptr, size, file, function, line); + p=MY_REALLOC(shm_block, ptr, size, file, function, line, mname); shm_unlock(); return p; } #define shm_malloc( _size ) _shm_malloc((_size), \ - _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ ) + _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ , _SRC_MODULE_) #define shm_realloc( _ptr, _size ) _shm_realloc( (_ptr), (_size), \ - _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ ) + _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) #define shm_free_unsafe( _p ) \ - MY_FREE( shm_block, (_p), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ ) + MY_FREE( shm_block, (_p), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) #define shm_free(_p) \ do { \ @@ -257,9 +257,9 @@ do { \ void* _shm_resize(void* ptr, unsigned int size, const char* f, const char* fn, - int line); + int line, const char *mname); #define shm_resize(_p, _s ) _shm_resize((_p), (_s), \ - _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ ) + _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) /*#define shm_resize(_p, _s ) shm_realloc( (_p), (_s))*/
9 years, 1 month
1
0
0
0
git:master:ea189de0: mem: f_malloc extended for per module memory stats
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ea189de0e7a82be2fb2708ceeadf64b89516bc83 URL:
https://github.com/kamailio/kamailio/commit/ea189de0e7a82be2fb2708ceeadf64b…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:48:28+01:00 mem: f_malloc extended for per module memory stats --- Modified: mem/f_malloc.c Modified: mem/f_malloc.h --- Diff:
https://github.com/kamailio/kamailio/commit/ea189de0e7a82be2fb2708ceeadf64b…
Patch:
https://github.com/kamailio/kamailio/commit/ea189de0e7a82be2fb2708ceeadf64b…
9 years, 1 month
1
0
0
0
git:master:a60f7438: core: mem - references use now 'core' for operations done from code in core
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: a60f743848e0fed1f994835eefaa24f6e59c302c URL:
https://github.com/kamailio/kamailio/commit/a60f743848e0fed1f994835eefaa24f…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:45:25+01:00 core: mem - references use now 'core' for operations done from code in core - previously it was '<core>' - makes it more coherent, given the case of module names --- Modified: mem/src_loc.h --- Diff:
https://github.com/kamailio/kamailio/commit/a60f743848e0fed1f994835eefaa24f…
Patch:
https://github.com/kamailio/kamailio/commit/a60f743848e0fed1f994835eefaa24f…
--- diff --git a/mem/src_loc.h b/mem/src_loc.h index 33c2df6..af00446 100644 --- a/mem/src_loc.h +++ b/mem/src_loc.h @@ -68,7 +68,7 @@ # ifdef MOD_NAME # define _SRC_MODULE_ MOD_NAME # else -# define _SRC_MODULE_ "<core>" +# define _SRC_MODULE_ "core" # endif /* MOD_NAME */ #endif /* _SRC_MODULE_ */
9 years, 1 month
1
0
0
0
git:master:bee6a696: core: mem/shm - api to get per module use/free stats
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: bee6a696148adcd6ceb2f7a2ca7758156ed3ffba URL:
https://github.com/kamailio/kamailio/commit/bee6a696148adcd6ceb2f7a2ca77581…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:44:05+01:00 core: mem/shm - api to get per module use/free stats --- Modified: mem/shm.c Modified: mem/shm.h --- Diff:
https://github.com/kamailio/kamailio/commit/bee6a696148adcd6ceb2f7a2ca77581…
Patch:
https://github.com/kamailio/kamailio/commit/bee6a696148adcd6ceb2f7a2ca77581…
--- diff --git a/mem/shm.c b/mem/shm.c index df8e13e..94a9915 100644 --- a/mem/shm.c +++ b/mem/shm.c @@ -221,6 +221,8 @@ int shm_init_api(sr_shm_api_t *ap) _shm_root.xavailable = ap->xavailable; _shm_root.xsums = ap->xsums; _shm_root.xdestroy = ap->xdestroy; + _shm_root.xstats = ap->xstats; + _shm_root.xfstats = ap->xfstats; return 0; } diff --git a/mem/shm.h b/mem/shm.h index 47d11df..cbf4c3a 100644 --- a/mem/shm.h +++ b/mem/shm.h @@ -49,17 +49,17 @@ extern sr_shm_api_t _shm_root; #ifdef DBG_SR_MEMORY # define shm_malloc(s) _shm_root.xmalloc(_shm_root.mem_block, (s), _SRC_LOC_, \ - _SRC_FUNCTION_, _SRC_LINE_) + _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) # define shm_malloc_unsafe(s) _shm_root.xmalloc_unsafe(_shm_root.mem_block, (s), _SRC_LOC_, \ - _SRC_FUNCTION_, _SRC_LINE_) + _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) # define shm_realloc(p, s) _shm_root.xrealloc(_shm_root.mem_block, (p), (s), \ - _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_) + _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) # define shm_resize(p, s) _shm_root.xresize(_shm_root.mem_block, (p), (s), \ - _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_) + _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) # define shm_free(p) _shm_root.xfree(_shm_root.mem_block, (p), _SRC_LOC_, \ - _SRC_FUNCTION_, _SRC_LINE_) + _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) # define shm_free_unsafe(p) _shm_root.xfree_unsafe(_shm_root.mem_block, (p), _SRC_LOC_, \ - _SRC_FUNCTION_, _SRC_LINE_) + _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) #else # define shm_malloc(s) _shm_root.xmalloc(_shm_root.mem_block, (s)) # define shm_malloc_unsafe(s) _shm_root.xmalloc_unsafe(_shm_root.mem_block, (s)) @@ -73,6 +73,9 @@ extern sr_shm_api_t _shm_root; # define shm_info(mi) _shm_root.xinfo(_shm_root.mem_block, mi) # define shm_available() _shm_root.xavailable(_shm_root.mem_block) # define shm_sums() _shm_root.xsums(_shm_root.mem_block) +# define shm_mod_get_stats(x) _shm_root.xstats(_shm_root.mem_block, x) +# define shm_mod_free_stats(x) _shm_root.xfstats(x) + void* shm_core_get_pool(void); int shm_init_api(sr_shm_api_t *ap);
9 years, 1 month
1
0
0
0
git:master:0e9a0c23: core: mem/pkg - api to get per module use/free stats
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 0e9a0c237ffe5d335b39270d681ce49be18b903f URL:
https://github.com/kamailio/kamailio/commit/0e9a0c237ffe5d335b39270d681ce49…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:43:05+01:00 core: mem/pkg - api to get per module use/free stats --- Modified: mem/pkg.c Modified: mem/pkg.h --- Diff:
https://github.com/kamailio/kamailio/commit/0e9a0c237ffe5d335b39270d681ce49…
Patch:
https://github.com/kamailio/kamailio/commit/0e9a0c237ffe5d335b39270d681ce49…
--- diff --git a/mem/pkg.c b/mem/pkg.c index f754327..a4f0906 100644 --- a/mem/pkg.c +++ b/mem/pkg.c @@ -46,6 +46,8 @@ int pkg_init_api(sr_pkg_api_t *ap) _pkg_root.xavailable = ap->xavailable; _pkg_root.xsums = ap->xsums; _pkg_root.xdestroy = ap->xdestroy; + _pkg_root.xstats = ap->xstats; + _pkg_root.xfstats = ap->xfstats; return 0; } diff --git a/mem/pkg.h b/mem/pkg.h index dd062bb..82e430a 100644 --- a/mem/pkg.h +++ b/mem/pkg.h @@ -28,11 +28,11 @@ extern sr_pkg_api_t _pkg_root; #ifdef DBG_SR_MEMORY # define pkg_malloc(s) _pkg_root.xmalloc(_pkg_root.mem_block, (s), _SRC_LOC_, \ - _SRC_FUNCTION_, _SRC_LINE_) + _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) # define pkg_free(p) _pkg_root.xfree(_pkg_root.mem_block, (p), _SRC_LOC_, \ - _SRC_FUNCTION_, _SRC_LINE_) + _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) # define pkg_realloc(p, s) _pkg_root.xrealloc(_pkg_root.mem_block, (p), (s), \ - _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_) + _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_) #else # define pkg_malloc(s) _pkg_root.xmalloc(_pkg_root.mem_block, (s)) # define pkg_realloc(p, s) _pkg_root.xrealloc(_pkg_root.mem_block, (p), (s)) @@ -43,6 +43,8 @@ extern sr_pkg_api_t _pkg_root; # define pkg_info(mi) _pkg_root.xinfo(_pkg_root.mem_block, mi) # define pkg_available() _pkg_root.xavailable(_pkg_root.mem_block) # define pkg_sums() _pkg_root.xsums(_pkg_root.mem_block) +# define pkg_mod_get_stats(x) _pkg_root.xstats(_pkg_root.mem_block, x) +# define pkg_mod_free_stats(x) _pkg_root.xfstats(x) int pkg_init_api(sr_pkg_api_t *ap); int pkg_init_manager(char *name);
9 years, 1 month
1
0
0
0
git:master:2e7b5dd2: core: added events for per module pkg/shm summary
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 2e7b5dd2701f7baf0c31a56ae268c94a2da6ae14 URL:
https://github.com/kamailio/kamailio/commit/2e7b5dd2701f7baf0c31a56ae268c94…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:38:40+01:00 core: added events for per module pkg/shm summary - used by kex for per module memory stats --- Modified: events.c Modified: events.h --- Diff:
https://github.com/kamailio/kamailio/commit/2e7b5dd2701f7baf0c31a56ae268c94…
Patch:
https://github.com/kamailio/kamailio/commit/2e7b5dd2701f7baf0c31a56ae268c94…
--- diff --git a/events.c b/events.c index 5312e7a..3b0d651 100644 --- a/events.c +++ b/events.c @@ -165,6 +165,15 @@ int sr_event_register_cb(int type, sr_event_cb_f f) _sr_events_list.rcv_nosip = f; else return -1; break; + case SREV_MODULE_PKG_STATS: + if(_sr_events_list.mod_update_pkg_stats==0) + _sr_events_list.mod_update_pkg_stats = f; + else return -1; + case SREV_MODULE_SHM_STATS: + if(_sr_events_list.mod_update_shm_stats==0) + _sr_events_list.mod_update_shm_stats = f; + else return -1; + break; default: return -1; } @@ -284,6 +293,18 @@ int sr_event_exec(int type, void *data) ret = _sr_events_list.rcv_nosip(data); return ret; } else return 1; + case SREV_MODULE_PKG_STATS: + if(unlikely(_sr_events_list.mod_update_pkg_stats!=0)) + { + ret = _sr_events_list.mod_update_pkg_stats(data); + return ret; + } else return 1; + case SREV_MODULE_SHM_STATS: + if(unlikely(_sr_events_list.mod_update_shm_stats!=0)) + { + ret = _sr_events_list.mod_update_shm_stats(data); + return ret; + } else return 1; default: return -1; } @@ -319,6 +340,10 @@ int sr_event_enabled(int type) return (_sr_events_list.stun_in!=0)?1:0; case SREV_RCV_NOSIP: return (_sr_events_list.rcv_nosip!=0)?1:0; + case SREV_MODULE_PKG_STATS: + return (_sr_events_list.mod_update_pkg_stats!=0)?1:0; + case SREV_MODULE_SHM_STATS: + return (_sr_events_list.mod_update_shm_stats!=0)?1:0; } return 0; } diff --git a/events.h b/events.h index 8218453..4443a79 100644 --- a/events.h +++ b/events.h @@ -34,6 +34,8 @@ #define SREV_TCP_WS_FRAME_IN 10 #define SREV_TCP_WS_FRAME_OUT 11 #define SREV_STUN_IN 12 +#define SREV_MODULE_PKG_STATS 13 +#define SREV_MODULE_SHM_STATS 14 #define SREV_CB_LIST_SIZE 3 @@ -52,6 +54,8 @@ typedef struct sr_event_cb { sr_event_cb_f tcp_ws_frame_out; sr_event_cb_f stun_in; sr_event_cb_f rcv_nosip; + sr_event_cb_f mod_update_pkg_stats; + sr_event_cb_f mod_update_shm_stats; } sr_event_cb_t; void sr_event_cb_init(void);
9 years, 1 month
1
0
0
0
git:master:3a0888f3: core: mem - api extended to track module name in debugging mode
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 3a0888f392c8e0e056c6b03cbd0013bfaba9e8aa URL:
https://github.com/kamailio/kamailio/commit/3a0888f392c8e0e056c6b03cbd0013b…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:41:04+01:00 core: mem - api extended to track module name in debugging mode - memory operations will keep reference to module --- Modified: mem/memapi.h --- Diff:
https://github.com/kamailio/kamailio/commit/3a0888f392c8e0e056c6b03cbd0013b…
Patch:
https://github.com/kamailio/kamailio/commit/3a0888f392c8e0e056c6b03cbd0013b…
--- diff --git a/mem/memapi.h b/mem/memapi.h index e1b78a0..9f918f3 100644 --- a/mem/memapi.h +++ b/mem/memapi.h @@ -27,13 +27,13 @@ #ifdef DBG_SR_MEMORY typedef void* (*sr_malloc_f)(void* mbp, unsigned long size, - const char* file, const char* func, unsigned int line); -typedef void (*sr_free_f)(void* mbp, void* p, const char* file, const char* func, - unsigned int line); + const char* file, const char* func, unsigned int line, const char* mname); +typedef void (*sr_free_f)(void* mbp, void* p, const char* file, const char* func, + unsigned int line, const char* mname); typedef void* (*sr_realloc_f)(void* mbp, void* p, unsigned long size, - const char* file, const char* func, unsigned int line); + const char* file, const char* func, unsigned int line, const char* mname); typedef void* (*sr_resize_f)(void* mbp, void* p, unsigned long size, - const char* file, const char* func, unsigned int line); + const char* file, const char* func, unsigned int line, const char* mname); #else /*DBG_SR_MEMORY*/ @@ -51,6 +51,9 @@ typedef void (*sr_mem_sums_f)(void* mbp); typedef void (*sr_mem_destroy_f)(void); +typedef void (*sr_mem_mod_get_stats_f)(void* mbp, void **p); +typedef void (*sr_mem_mod_free_stats_f)(void* mbp); + /*private memory api*/ typedef struct sr_pkg_api { /*memory manager name - soft copy*/ @@ -75,6 +78,10 @@ typedef struct sr_pkg_api { sr_mem_sums_f xsums; /*memory destroy manager*/ sr_mem_destroy_f xdestroy; + /*memory stats per module*/ + sr_mem_mod_get_stats_f xstats; + /*memory stats free per module*/ + sr_mem_mod_free_stats_f xfstats; } sr_pkg_api_t; /*shared memory api*/ @@ -107,6 +114,10 @@ typedef struct sr_shm_api { sr_mem_sums_f xsums; /*memory destroy manager*/ sr_mem_destroy_f xdestroy; + /*memory stats per module*/ + sr_mem_mod_get_stats_f xstats; + /*memory stats free per module*/ + sr_mem_mod_free_stats_f xfstats; } sr_shm_api_t; #endif
9 years, 1 month
1
0
0
0
git:master:b1d96ffc: kex: per module memory statistics when in debugging mode
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: b1d96ffc24e92887cc3bf0dcc66ead94e357f081 URL:
https://github.com/kamailio/kamailio/commit/b1d96ffc24e92887cc3bf0dcc66ead9…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-11-02T13:34:44+01:00 kex: per module memory statistics when in debugging mode - return details about memory used by each module via rpc commands --- Added: modules/kex/mod_stats.c Added: modules/kex/mod_stats.h Modified: modules/kex/doc/kex_admin.xml Modified: modules/kex/kex_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/b1d96ffc24e92887cc3bf0dcc66ead9…
Patch:
https://github.com/kamailio/kamailio/commit/b1d96ffc24e92887cc3bf0dcc66ead9…
9 years, 1 month
1
0
0
0
← Newer
1
...
28
29
30
31
32
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Results per page:
10
25
50
100
200