예제 #1
0
/* ===================================================================== */
int main(int argc, char *argv[])
{
  if (PIN_Init(argc,argv)) return Usage();

  // Single thread profile enabled ?
  if (KnobSingleThread.Value())
     {
     bimodal.SetSingleOSThreadID(KnobSingleThread.Value());
     gshare.SetSingleOSThreadID(KnobSingleThread.Value());
     simpleindirect.SetSingleOSThreadID(KnobSingleThread.Value());
     vpcsimpleindirect.SetSingleOSThreadID(KnobSingleThread.Value());
     targetcache.SetSingleOSThreadID(KnobSingleThread.Value());
     }

  // Active the predictors.
  if (!KnobDisableBimodal.Value())
     {
     bimodal.Activate();
     }
  if (!KnobDisableGshare.Value())
     {
     gshare.Activate();
     }
  if (!KnobDisableSimpleIndirect.Value())
     {
     simpleindirect.Activate();
     }
  if (!KnobDisableVPCIndirect.Value())
     {
     vpcsimpleindirect.Activate();
     }
  if (!KnobDisableTargetCache.Value())
     {
     targetcache.Activate();
     }

  // Activate the icount.
  if (!KnobDisableICount.Value()) 
     {
     icount.Activate();
     }

  outfile = new ofstream(KnobOutputFile.Value().c_str());

  PIN_AddFiniFunction(Fini, 0);
  PIN_StartProgram();
}
예제 #2
0
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
    if( PIN_Init(argc,argv) )
    {
        return Usage();
    }

    icount.Activate();
    
    // Activate alarm, must be done before PIN_StartProgram
    control.CheckKnobs(Handler, 0);

    // Start the program, never returns
    PIN_StartProgram();
    
    return 0;
}
예제 #3
0
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
    if( PIN_Init(argc,argv) )
    {
        return Usage();
    }

    PIN_InitLock(&output_lock);
    icount.Activate();
    
    // Activate alarm, must be done before PIN_StartProgram
    control.RegisterHandler(Handler, 0, FALSE);
    control.Activate();

    // Start the program, never returns
    PIN_StartProgram();
    
    return 0;
}
int main(int argc, char *argv[])
{
    if( PIN_Init(argc,argv) )
    {
        return Usage();
    }

    icount.Activate();
    bimodal.Activate();


    // Activate alarm, must be done before PIN_StartProgram
    control.CheckKnobs(Handler, 0);


    outfile = new ofstream("bimodal.out");

    PIN_AddFiniFunction(Fini, 0);
    PIN_StartProgram();
}
예제 #5
0
int main(int argc, char * argv[])
{
    if( PIN_Init(argc,argv) )
    {
        return Usage();
    }

    icount.Activate();

    // Activate alarm, must be done before PIN_StartProgram
    control.CheckKnobs(Handler, 0);
    
    // Callback function "byeWorld" is invoked
    // right before Pin releases control of the application
    // to allow it to return to normal execution
    PIN_AddDetachFunction(helloWorld, 0);
    PIN_AddDetachFunction(byeWorld, 0);

    // Never returns
    PIN_StartProgram();
    
    return 0;
}