lorinlee commented on issue #903: tools: add gdb_bthread_stack.py
URL: https://github.com/apache/incubator-brpc/pull/903#issuecomment-525127091
 
 
   > bthread_list中显示的数目和bthread_num的不一致
   > 
   > ```
   > (gdb) bthread_begin 
   > Active bthreads: 25, will display 25 bthreads
   > Enter bthread debug mode, do not switch thread before exec 'bthread_end' 
!!!
   > (gdb) bthread_list
   > id tid     function total:5
   > #0 2675764627290   0x503a60 <brpc::Socket::ProcessEvent(void*)>
   > #1 4294969344      0x511900 <brpc::GlobalUpdate(void*)>
   > #2 4294969345      0x4fa3f0 <brpc::EventDispatcher::RunThis(void*)>
   > #3 4294969346      0x4d71b0 <brpc::Server::UpdateDerivedVars(void*)>
   > #4 2628519987470   0x6cd9d0 <brpc::ProcessInputMessage(void*)>
   > (gdb) bthread_num
   > 25
   > ```
   
   
数量不一致也是符合预期的,目前计数依赖的是bvar,但扫bthread的时候对于stack是0x0的跳过了,因为之前认为这些堆栈信息没有意义,所以创建了bthread但是还没被调度执行(没有分配stack)的就不会显示在list里

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to