summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorQiuwen Lu <[email protected]>2016-10-27 11:24:10 +0800
committerQiuwen Lu <[email protected]>2016-10-27 11:24:10 +0800
commit7b09eafa29d9948df75a9ef7bc107fe208e4ead0 (patch)
tree038c9305164bc95ef93ae672146c581f9c6ba74c /tools
parentd321d38423fe14bdecd62157a4a51aac639f4c23 (diff)
在runtime库中增加信号处理和退出处理函数,确保应用在正常、异常退出情况下执行注销过程。
Diffstat (limited to 'tools')
-rw-r--r--tools/stat/app_stat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/stat/app_stat.c b/tools/stat/app_stat.c
index 74f906e..623169d 100644
--- a/tools/stat/app_stat.c
+++ b/tools/stat/app_stat.c
@@ -151,10 +151,11 @@ void pinfo_stat_loop(FILE * stream, struct appinfo * pinfo,
struct mr_app_stat * st_now, struct mr_app_stat * st_last,
int speed, int delta_time, int human)
{
- const char * appsym = pinfo->symbol;
- unsigned int appid = pinfo->app_id;
+ const char * appsym = mr_appinfo_get_symbol(pinfo);
+ unsigned int appid = mr_appinfo_get_app_id(pinfo);
+ unsigned int nr_max_thread = mr_appinfo_get_nr_max_thread(pinfo);
- for(int sid = 0; sid < pinfo->nr_max_thread; sid++)
+ for(int sid = 0; sid < nr_max_thread; sid++)
{
if (speed)
write_speed_line(stream, appsym, appid, sid,