#define VGP_M_STACK 10
-#define VGP_M_CCS 24 /* == the # of elems in VGP_LIST */
+#define VGP_M_CCS 26 /* == the # of elems in VGP_LIST */
#define VGP_LIST \
- VGP_PAIR(VgpRun=0, "running"), \
+ VGP_PAIR(VgpUnc=0, "unclassified"), \
+ VGP_PAIR(VgpRun, "running"), \
+ VGP_PAIR(VgpSched, "scheduler"), \
VGP_PAIR(VgpMalloc, "low-lev malloc/free"), \
VGP_PAIR(VgpCliMalloc, "client malloc/free"), \
VGP_PAIR(VgpTranslate, "translate-main"), \
VG_(bbs_to_go) = VG_(clo_stop_after);
+ VGP_PUSHCC(VgpSched);
VG_(scheduler_init)();
src = VG_(scheduler)();
+ VGP_POPCC;
if (VG_(clo_verbosity) > 0)
VG_(message)(Vg_UserMsg, "");
vg_assert(vg_threads[tid].status == VgTs_Runnable);
vg_assert(VG_(bbs_to_go) > 0);
+ VGP_PUSHCC(VgpRun);
VG_(load_thread_state) ( tid );
if (__builtin_setjmp(VG_(scheduler_jmpbuf)) == 0) {
/* try this ... */
trc = VG_TRC_UNRESUMABLE_SIGNAL;
}
VG_(save_thread_state) ( tid );
+ VGP_POPCC;
return trc;
}
cb = VG_(allocCodeBlock)();
/* Disassemble this basic block into cb. */
- VGP_PUSHCC(VgpToUCode);
+ /* VGP_PUSHCC(VgpToUCode); */
n_disassembled_bytes = VG_(disBB) ( cb, orig_addr );
- VGP_POPCC;
+ /* VGP_POPCC; */
/* dis=True; */
/* if (0&& VG_(translations_done) < 617) */
/* dis=False; */
/* Try and improve the code a bit. */
if (VG_(clo_optimise)) {
- VGP_PUSHCC(VgpImprove);
+ /* VGP_PUSHCC(VgpImprove); */
vg_improve ( cb );
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Improved code:" );
- VGP_POPCC;
+ /* VGP_POPCC; */
}
/* dis=False; */
/* Add instrumentation code. */
if (VG_(clo_instrument)) {
- VGP_PUSHCC(VgpInstrument);
+ /* VGP_PUSHCC(VgpInstrument); */
cb = vg_instrument(cb);
- VGP_POPCC;
+ /* VGP_POPCC; */
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Instrumented code:" );
if (VG_(clo_cleanup)) {
- VGP_PUSHCC(VgpCleanup);
+ /* VGP_PUSHCC(VgpCleanup); */
vg_cleanup(cb);
- VGP_POPCC;
+ /* VGP_POPCC; */
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Cleaned-up instrumented code:" );
}
/* Add cache simulation code. */
if (VG_(clo_cachesim)) {
- VGP_PUSHCC(VgpCacheInstrument);
+ /* VGP_PUSHCC(VgpCacheInstrument); */
cb = VG_(cachesim_instrument)(cb, orig_addr);
- VGP_POPCC;
+ /* VGP_POPCC; */
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Cachesim instrumented code:" );
}
//VG_(disassemble) = False;
/* Allocate registers. */
- VGP_PUSHCC(VgpRegAlloc);
+ /* VGP_PUSHCC(VgpRegAlloc); */
cb = vg_do_register_allocation ( cb );
- VGP_POPCC;
+ /* VGP_POPCC; */
/* dis=False; */
/*
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "After Register Allocation:");
*/
- VGP_PUSHCC(VgpFromUcode);
+ /* VGP_PUSHCC(VgpFromUcode); */
/* NB final_code is allocated with VG_(jitmalloc), not VG_(malloc)
and so must be VG_(jitfree)'d. */
final_code = VG_(emit_code)(cb, &final_code_size );
- VGP_POPCC;
+ /* VGP_POPCC; */
VG_(freeCodeBlock)(cb);
if (debugging_translation) {
vgp_nticks = 0;
vgp_sp = -1;
- VGP_(pushcc) ( VgpRun );
+ VGP_(pushcc) ( VgpUnc );
value.it_interval.tv_sec = 0;
value.it_interval.tv_usec = 10 * 1000;
#define VGP_M_STACK 10
-#define VGP_M_CCS 24 /* == the # of elems in VGP_LIST */
+#define VGP_M_CCS 26 /* == the # of elems in VGP_LIST */
#define VGP_LIST \
- VGP_PAIR(VgpRun=0, "running"), \
+ VGP_PAIR(VgpUnc=0, "unclassified"), \
+ VGP_PAIR(VgpRun, "running"), \
+ VGP_PAIR(VgpSched, "scheduler"), \
VGP_PAIR(VgpMalloc, "low-lev malloc/free"), \
VGP_PAIR(VgpCliMalloc, "client malloc/free"), \
VGP_PAIR(VgpTranslate, "translate-main"), \
VG_(bbs_to_go) = VG_(clo_stop_after);
+ VGP_PUSHCC(VgpSched);
VG_(scheduler_init)();
src = VG_(scheduler)();
+ VGP_POPCC;
if (VG_(clo_verbosity) > 0)
VG_(message)(Vg_UserMsg, "");
vgp_nticks = 0;
vgp_sp = -1;
- VGP_(pushcc) ( VgpRun );
+ VGP_(pushcc) ( VgpUnc );
value.it_interval.tv_sec = 0;
value.it_interval.tv_usec = 10 * 1000;
vg_assert(vg_threads[tid].status == VgTs_Runnable);
vg_assert(VG_(bbs_to_go) > 0);
+ VGP_PUSHCC(VgpRun);
VG_(load_thread_state) ( tid );
if (__builtin_setjmp(VG_(scheduler_jmpbuf)) == 0) {
/* try this ... */
trc = VG_TRC_UNRESUMABLE_SIGNAL;
}
VG_(save_thread_state) ( tid );
+ VGP_POPCC;
return trc;
}
cb = VG_(allocCodeBlock)();
/* Disassemble this basic block into cb. */
- VGP_PUSHCC(VgpToUCode);
+ /* VGP_PUSHCC(VgpToUCode); */
n_disassembled_bytes = VG_(disBB) ( cb, orig_addr );
- VGP_POPCC;
+ /* VGP_POPCC; */
/* dis=True; */
/* if (0&& VG_(translations_done) < 617) */
/* dis=False; */
/* Try and improve the code a bit. */
if (VG_(clo_optimise)) {
- VGP_PUSHCC(VgpImprove);
+ /* VGP_PUSHCC(VgpImprove); */
vg_improve ( cb );
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Improved code:" );
- VGP_POPCC;
+ /* VGP_POPCC; */
}
/* dis=False; */
/* Add instrumentation code. */
if (VG_(clo_instrument)) {
- VGP_PUSHCC(VgpInstrument);
+ /* VGP_PUSHCC(VgpInstrument); */
cb = vg_instrument(cb);
- VGP_POPCC;
+ /* VGP_POPCC; */
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Instrumented code:" );
if (VG_(clo_cleanup)) {
- VGP_PUSHCC(VgpCleanup);
+ /* VGP_PUSHCC(VgpCleanup); */
vg_cleanup(cb);
- VGP_POPCC;
+ /* VGP_POPCC; */
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Cleaned-up instrumented code:" );
}
/* Add cache simulation code. */
if (VG_(clo_cachesim)) {
- VGP_PUSHCC(VgpCacheInstrument);
+ /* VGP_PUSHCC(VgpCacheInstrument); */
cb = VG_(cachesim_instrument)(cb, orig_addr);
- VGP_POPCC;
+ /* VGP_POPCC; */
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "Cachesim instrumented code:" );
}
//VG_(disassemble) = False;
/* Allocate registers. */
- VGP_PUSHCC(VgpRegAlloc);
+ /* VGP_PUSHCC(VgpRegAlloc); */
cb = vg_do_register_allocation ( cb );
- VGP_POPCC;
+ /* VGP_POPCC; */
/* dis=False; */
/*
if (VG_(disassemble))
VG_(ppUCodeBlock) ( cb, "After Register Allocation:");
*/
- VGP_PUSHCC(VgpFromUcode);
+ /* VGP_PUSHCC(VgpFromUcode); */
/* NB final_code is allocated with VG_(jitmalloc), not VG_(malloc)
and so must be VG_(jitfree)'d. */
final_code = VG_(emit_code)(cb, &final_code_size );
- VGP_POPCC;
+ /* VGP_POPCC; */
VG_(freeCodeBlock)(cb);
if (debugging_translation) {