view agent/test/race-condition/ClassPrepare/MonitorContendedEnter/test.py @ 227:f421a4c6e7ea

Bug 3357: [TEST][RaceCondition]Add some events with ClassPrepare Reviewed-by: yasuenag https://github.com/HeapStats/heapstats/pull/92
author KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp>
date Tue, 11 Apr 2017 18:05:01 +0900
parents
children 84f67233da38
line wrap: on
line source

import sys, os, time
sys.path.append(os.pardir + "/../")

import common

def Cond_OnClassPrepare():
    gdb.newest_frame().older().select()
    symbol = gdb.execute("p (char *)klass->_name->_body", False, True)
    return (symbol.find("DynLoad") != -1)


common.initialize("OnClassPrepare", Cond_OnClassPrepare, "OnMonitorContendedEnterForThreadRecording", common.return_true, True)