add 'show threads' and 'show profile' commands.

These are momstly debugging tools for developers,
a bit documented in the header files (utils.h),
although more documentation is definitely necessary.

The performance impact is close to zero(*) so there is no
need to compile it conditionally.
(*) not completely true - thread destruction still needs
to search a list _but_ this can be easily optimized if we
end up with hundreds of active threads (in which case, though,
the problem is clearly elsewhere).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2006-04-12 20:40:46 +00:00
parent 8f09c4345f
commit 2876a25505
7 changed files with 354 additions and 4 deletions

View File

@@ -84,6 +84,25 @@ void ast_unregister_file_version(const char *file)
{
}
int ast_add_profile(const char *, uint64_t scale);
int ast_add_profile(const char *s, uint64_t scale)
{
return -1;
}
int64_t ast_profile(int, int64_t);
int64_t ast_profile(int key, int64_t val)
{
return 0;
}
int64_t ast_mark(int, int start1_stop0);
int64_t ast_mark(int key, int start1_stop0)
{
return 0;
}
/* end of dummy functions */
static struct ast_chan *find_chan(char *name)
{
struct ast_chan *chan;