def heapTLAB(): [TLAB, NonTLAB, threads, bitmap_size_, heapBegin_] = art.helper(hp, th, nPath, rAddr, path, memList) ref = sys.argv[4] [TLAB_str, TLAB_top, TLAB_end, TLAB_ObjCount] = hp.getTLAB(ref, memList) print "TLAB Starts " + str(TLAB_str) print "TLAB Ends " + str(TLAB_end) print "TLAB Objects " + str(TLAB_ObjCount) if (TLAB_ObjCount > 0): hp.getObjects(TLAB_str, TLAB_ObjCount, jvm, lstList, mapList, bitmap_size_, heapBegin_)
def getAllHeap(): [TLAB, NonTLAB, threads] = art.helper(hp, th, nPath, rAddr, path, memList) print "TLAB Regions" print "Index\tBegin\t\tTop\t\tEnd\t\tThread\t\tObjects\t\tTid\tThread_Name" for x in TLAB: y = x[x.rfind("\t")+1:] for key, value in threads.items(): if (y==key): [TLAB_str, TLAB_top,TLAB_end, TLAB_ObjCount] = hp.getTLAB(y, memList) print x+"\t"+str(TLAB_ObjCount)+"\t\t"+str(value[0])+"\t"+value[1] print "Non-TLAB Regions" print "Index\tBegin\t\tTop\t\tEnd\t\tObjects" print '\n'.join(NonTLAB)
def getAllHeap(): [TLAB, NonTLAB, threads, bitmap_size_, heapBegin_] = art.helper(hp, th, nPath, rAddr, path, memList) oCount = 0 print "TLAB Regions" print "Index\tBegin\t\tTop\t\tEnd\t\tNeed_bitmap\tThread\t\tObjects\t\tTid\tThread_Name" for x in TLAB: y = x[x.rfind("\t") + 1:] for key, value in sorted(threads.items()): if (y == key): [TLAB_str, TLAB_top, TLAB_end, TLAB_ObjCount] = hp.getTLAB(y, memList) oCount = oCount + TLAB_ObjCount print x + "\t" + str(TLAB_ObjCount) + "\t\t" + str( value[0]) + "\t" + value[1] print "Non-TLAB Regions" print "Index\tBegin\t\tTop\t\tEnd\t\tObjects\tNeed_bitmap" print '\n'.join(NonTLAB) print "Tlab Total " + str(oCount)
def getHeapDump(): [TLAB, NonTLAB, threads] = art.helper(hp, th, nPath, rAddr, path, memList) TotalObject =0 for x in TLAB: y = x[x.rfind("\t")+1:] for key, value in threads.items(): if (y==key): [TLAB_str, TLAB_top,TLAB_end, TLAB_ObjCount] = hp.getTLAB(key, memList) TotalObject = TotalObject+TLAB_ObjCount if (TLAB_ObjCount>0): hp.getObjects(TLAB_str, TLAB_ObjCount, jvm,lstList, mapList) for x in NonTLAB: subStr = x[x.find("\t")+1:] NTLAB_str = subStr[:subStr.find("\t")] NTLAB_ObjCount = int(subStr[subStr.rfind("\t")+1:]) if (NTLAB_ObjCount>0): TotalObject = TotalObject+NTLAB_ObjCount hp.getObjects(NTLAB_str, NTLAB_ObjCount, jvm, lstList, mapList) print TotalObject
def getGlobals(): [TLAB, NonTLAB, threads, bitmap_size_, heapBegin_] = art.helper(hp, th, nPath, rAddr, path, memList) return [TLAB, NonTLAB, threads, bitmap_size_, heapBegin_]
def heapNTLAB(): [TLAB, NonTLAB, threads, bitmap_size_, heapBegin_] = art.helper(hp, th, nPath, rAddr, path, memList) sAddr = sys.argv[4] objs = int(sys.argv[5]) hp.getObjects(sAddr, objs, jvm, lstList, mapList, bitmap_size_, heapBegin_)