MCPcopy Create free account
hub / github.com/apache/brpc / BthreadNumCmd

Class BthreadNumCmd

tools/gdb_bthread_stack.py:108–115  ·  view source on GitHub ↗

list active bthreads num

Source from the content-addressed store, hash-verified

106 print("#{}\t\t{}\t\t{}\t\t{}".format(i, t["tid"], t["fn"], "no" if str(t["stack"]) == "0x0" else "yes"))
107
108class BthreadNumCmd(gdb.Command):
109 """list active bthreads num"""
110 def __init__(self):
111 gdb.Command.__init__(self, "bthread_num", gdb.COMMAND_STACK, gdb.COMPLETE_NONE)
112
113 def invoke(self, arg, tty):
114 res = get_bthread_num()
115 print(res)
116
117class BthreadFrameCmd(gdb.Command):
118 """bthread_frame <id>, select bthread frame by id"""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected