com php-src: add memory usage info to print: phpdbg_prompt. c
| From: | Bob Weinand | Date: | Sun, 24 Nov 2013 07:28:54 +0000 |
| Subject: | com php-src: add memory usage info to print: phpdbg_prompt. c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74660@lists.php.net to get a copy of this message | ||
Commit: 6e8eeea3bce5bee736e5ad4fdca87d785ac78337
Author: krakjoe <joe.watkins@live.co.uk> Sun, 24 Nov 2013 07:28:54 +0000
Parents: b80baeb25e2f68675485fef6ef65f371cd44cf40
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6e8eeea3bce5bee736e5ad4fdca87d785ac78337
Log:
add memory usage info to print
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index a065b8f..552a8bc 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -729,11 +729,16 @@ PHPDBG_COMMAND(print) /* {{{ */
if (EG(in_execution)) {
phpdbg_writeln("VM Return\t%d", PHPDBG_G(vmret));
}
+
phpdbg_writeln("Classes\t\t%d", zend_hash_num_elements(EG(class_table)));
phpdbg_writeln("Functions\t%d", zend_hash_num_elements(EG(function_table)));
phpdbg_writeln("Constants\t%d", zend_hash_num_elements(EG(zend_constants)));
phpdbg_writeln("Included\t%d", zend_hash_num_elements(&EG(included_files)));
-
+ phpdbg_writeln(
+ "Memory\t\t%.3f/%.3f (kB)",
+ (float) (zend_memory_usage(1 TSRMLS_CC)/1024),
+ (float) (zend_memory_usage(0 TSRMLS_CC)/1024));
+
phpdbg_print_breakpoints(PHPDBG_BREAK_FILE TSRMLS_CC);
phpdbg_print_breakpoints(PHPDBG_BREAK_SYM TSRMLS_CC);
phpdbg_print_breakpoints(PHPDBG_BREAK_METHOD TSRMLS_CC);