summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorspashabk-in <shakeebbk@in.ibm.com>2017-08-28 09:49:20 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-09-12 23:13:08 -0400
commit4d82267c5fa48570edbf7cc906ee34a0edd20922 (patch)
tree48016f8db45f1fdc364f56b1804f985246dde66e /src/tools
parenta61ac117de833853728f77f4dacc396d789fc43a (diff)
downloadtalos-sbe-4d82267c5fa48570edbf7cc906ee34a0edd20922.tar.gz
talos-sbe-4d82267c5fa48570edbf7cc906ee34a0edd20922.zip
SBE debug tool - stack usage from pibmem dump
Enable stack usage command for pibmem dump file Change-Id: Ie8d8e4cfbae4411e9d17ab7ebd5ab226eb603967 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45230 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/tools')
-rwxr-xr-xsrc/tools/debug/sbe-debug.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/tools/debug/sbe-debug.py b/src/tools/debug/sbe-debug.py
index eceb5015..5c4a860a 100755
--- a/src/tools/debug/sbe-debug.py
+++ b/src/tools/debug/sbe-debug.py
@@ -251,7 +251,7 @@ def collectAttr( target, node, proc, ddsuffix, file_path ):
print "ERROR running %s: %d " % ( cmd3, rc )
return 1
-def collectStackUsage (node, proc ):
+def collectStackUsage (target, node, proc, file_path ):
threads = ('sbeSyncCommandProcessor_stack',
'sbeCommandReceiver_stack',
'sbe_Kernel_NCInt_stack',
@@ -259,15 +259,18 @@ def collectStackUsage (node, proc ):
for thread in threads:
offset = getOffset( thread );
length = "0x" + syms[thread][1];
- cmd1 = (getFilePath("p9_pibmem_dump_wrap.exe")+" -quiet -start_byte " +
+ if(target == 'FILE'):
+ createPibmemDumpFile(file_path, offset, length)
+ else:
+ cmd1 = (getFilePath("p9_pibmem_dump_wrap.exe")+" -quiet -start_byte " +
str(offset) +\
" -num_of_byte " + length + " "
" -n" + str(node) + " -p" + str(proc))
- print "cmd1:", cmd1
- rc = os.system( cmd1 )
- if ( rc ):
- print "ERROR running %s: %d " % ( cmd1, rc )
- return 1
+ print "cmd1:", cmd1
+ rc = os.system( cmd1 )
+ if ( rc ):
+ print "ERROR running %s: %d " % ( cmd1, rc )
+ return 1
# Dump stack memory to binary file
cmd2 = "cat DumpPIBMEM >>"+thread
@@ -622,7 +625,7 @@ def main( argv ):
sbeLocalRegister( target, node, proc, file_path )
elif ( level == 'stack' ):
fillSymTable(target, ddsuffix)
- collectStackUsage( node, proc )
+ collectStackUsage( target, node, proc, file_path )
elif ( level == 'sym' ):
fillSymTable(target, ddsuffix)
getSymbolVal(target, node, proc, symbol, file_path)
OpenPOWER on IntegriCloud