void MainWindow::replayStart() { if (m_trace->isSaving()) { QMessageBox::warning( this, tr("Trace Saving"), tr("QApiTrace is currently saving the edited trace file. " "Please wait until it finishes and try again.")); return; } QDialog dlg; Ui_RetracerDialog dlgUi; dlgUi.setupUi(&dlg); dlgUi.doubleBufferingCB->setChecked( m_retracer->isDoubleBuffered()); dlgUi.errorCheckCB->setChecked( !m_retracer->isBenchmarking()); if (dlg.exec() == QDialog::Accepted) { m_retracer->setDoubleBuffered( dlgUi.doubleBufferingCB->isChecked()); m_retracer->setBenchmarking( !dlgUi.errorCheckCB->isChecked()); replayTrace(false); } }
/* * main - Main routine */ int main(int argc, char* argv[]) { char c; while( (c=getopt(argc,argv,"s:E:b:t:vh")) != -1){ switch(c){ case 's': s = atoi(optarg); break; case 'E': E = atoi(optarg); break; case 'b': b = atoi(optarg); break; case 't': trace_file = optarg; break; case 'v': verbosity = 1; break; case 'h': printUsage(argv); exit(0); default: printUsage(argv); exit(1); } } /* Make sure that all required command line args were specified */ if (s == 0 || E == 0 || b == 0 || trace_file == NULL) { printf("%s: Missing required command line argument\n", argv[0]); printUsage(argv); exit(1); } /* Compute S, E and B from command line args */ S=pow(2,s); B=pow(2,b); /* Initialize cache */ initCache(); #ifdef DEBUG_ON printf("DEBUG: S:%u E:%u B:%u trace:%s\n", S, E, B, trace_file); #endif /* Read the trace and access the cache */ replayTrace(trace_file); /* Free allocated memory */ freeCache(); /* Output the hit and miss statistics for the autograder */ printSummary(hit_count, miss_count, eviction_count); return 0; }
void MainWindow::lookupState() { if (!m_selectedEvent) { QMessageBox::warning( this, tr("Unknown Event"), tr("To inspect the state select an event in the event list.")); return; } if (m_trace->isSaving()) { QMessageBox::warning( this, tr("Trace Saving"), tr("QApiTrace is currently saving the edited trace file. " "Please wait until it finishes and try again.")); return; } m_stateEvent = m_selectedEvent; replayTrace(true, false); }
void MainWindow::replayProfile() { if (m_trace->isSaving()) { QMessageBox::warning( this, tr("Trace Saving"), tr("QApiTrace is currently saving the edited trace file. " "Please wait until it finishes and try again.")); return; } QDialog dlg; Ui_ProfileReplayDialog dlgUi; dlgUi.setupUi(&dlg); if (dlg.exec() == QDialog::Accepted) { m_retracer->setProfiling( dlgUi.gpuTimesCB->isChecked(), dlgUi.cpuTimesCB->isChecked(), dlgUi.pixelsDrawnCB->isChecked()); replayTrace(false, false); } }
void MainWindow::showThumbnails() { replayTrace(false, true); }