[IPOIB, IBBUS] g_stat: first patch of several, adding and populating global g_stat...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 17 Nov 2009 14:12:21 +0000 (14:12 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 17 Nov 2009 14:12:21 +0000 (14:12 +0000)
commitad762d88b8bf27c636d9d5d342b28bbd88dc0e9c
tree9f7ce0e1bc8f0963a7d087a0312c9363ea67bc88
parentfd11bdf0e13ec0374e617d0b9a3936a38714de86
[IPOIB, IBBUS] g_stat: first patch of several, adding and populating global g_stat structure to the drivers of IB stack

For debug purposes.
Usable in both checked and free version.
Usage: open Watch Window in Debugger and add ipoib!g_stat or ibbus!g_stat.

An example of a real problem: MLX4 driver is stuck on unload.

It can happen when IBAL is stuck on resource reclamation.
The reclamation is being done in one of IBAL threads, which are started on IBAL's start up.
So you'd like to look into this thread.
But where it is ?
You can find it by printing ALL the threads of System process and looking for ibbus in their stack traces.
It can take minutes.

After this patch you can do that in 3 seconds this way:
1. open Watch Window in WinDbg and add ibbus!g_stat.
2. open
ibbus!g_stat->Drv->Gp_async_obj_mgr->Thread_pool->P_thread[0]->Osd->P_thread

This field contains the address of the thread, you wanted.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2580 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
17 files changed:
core/al/al_init.c
core/al/al_mgr.h
core/al/kernel/SOURCES
core/bus/kernel/SOURCES
core/bus/kernel/bus_driver.c
core/bus/kernel/bus_driver.h
core/bus/kernel/bus_pnp.c
core/bus/kernel/bus_stat.c [new file with mode: 0644]
core/bus/kernel/bus_stat.h [new file with mode: 0644]
core/complib/cl_threadpool.c
core/complib/kernel/cl_thread.c
inc/complib/cl_threadpool.h
ulp/ipoib/kernel/SOURCES
ulp/ipoib/kernel/ipoib_adapter.h
ulp/ipoib/kernel/ipoib_driver.c
ulp/ipoib/kernel/ipoib_stat.c [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_stat.h [new file with mode: 0644]