bool profilingGpuTimes = false;
bool profilingCpuTimes = false;
bool profilingPixelsDrawn = false;
bool profilingGpuTimes = false;
bool profilingCpuTimes = false;
bool profilingPixelsDrawn = false;
- snprintf(comment, sizeof comment, "%u", call_no);
+ snprintf(comment, sizeof comment, "%u",
+ useCallNos ? call_no : snapshot_no);
- os::String filename = os::String::format("%s%010u.png", snapshotPrefix, call_no);
+ os::String filename = os::String::format("%s%010u.png",
+ snapshotPrefix,
+ useCallNos ? call_no : snapshot_no);
" --ppd pixels drawn profiling (pixels drawn per draw call)\n"
" -c, --compare=PREFIX compare against snapshots with given PREFIX\n"
" -C, --calls=CALLSET calls to compare (default is every frame)\n"
" --ppd pixels drawn profiling (pixels drawn per draw call)\n"
" -c, --compare=PREFIX compare against snapshots with given PREFIX\n"
" -C, --calls=CALLSET calls to compare (default is every frame)\n"
" --sb use a single buffer visual\n"
" -s, --snapshot-prefix=PREFIX take snapshots; `-` for PNM stdout output\n"
" -S, --snapshot=CALLSET calls to snapshot (default is every frame)\n"
" --sb use a single buffer visual\n"
" -s, --snapshot-prefix=PREFIX take snapshots; `-` for PNM stdout output\n"
" -S, --snapshot=CALLSET calls to snapshot (default is every frame)\n"
const static struct option
longOptions[] = {
{"benchmark", no_argument, 0, 'b'},
const static struct option
longOptions[] = {
{"benchmark", no_argument, 0, 'b'},
{"calls", required_argument, 0, 'C'},
{"compare", required_argument, 0, 'c'},
{"core", no_argument, 0, CORE_OPT},
{"db", no_argument, 0, DB_OPT},
{"calls", required_argument, 0, 'C'},
{"compare", required_argument, 0, 'c'},
{"core", no_argument, 0, CORE_OPT},
{"db", no_argument, 0, DB_OPT},
{"dump-state", required_argument, 0, 'D'},
{"help", no_argument, 0, 'h'},
{"pcpu", no_argument, 0, PCPU_OPT},
{"dump-state", required_argument, 0, 'D'},
{"help", no_argument, 0, 'h'},
{"pcpu", no_argument, 0, PCPU_OPT},
+ case DRIVER_OPT:
+ if (strcasecmp(optarg, "hw") == 0) {
+ driver = DRIVER_HARDWARE;
+ } else if (strcasecmp(optarg, "sw") == 0) {
+ driver = DRIVER_SOFTWARE;
+ } else if (strcasecmp(optarg, "ref") == 0) {
+ driver = DRIVER_REFERENCE;
+ } else if (strcasecmp(optarg, "null") == 0) {
+ driver = DRIVER_NULL;
+ } else {
+ driver = DRIVER_MODULE;
+ driverModule = optarg;
+ }
+ break;
retrace::profiler.setup(retrace::profilingCpuTimes, retrace::profilingGpuTimes, retrace::profilingPixelsDrawn);
}
retrace::profiler.setup(retrace::profilingCpuTimes, retrace::profilingGpuTimes, retrace::profilingPixelsDrawn);
}