mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-04 09:04:39 -07:00
tests/atomic_add-bench: add -p to enable sync profiler
When used together with -m, this allows us to benchmark the profiler's performance impact on qemu_mutex_lock. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
cb764d0665
commit
9d5cff3df5
1 changed files with 5 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ static bool test_stop;
|
|||
static const char commands_string[] =
|
||||
" -n = number of threads\n"
|
||||
" -m = use mutexes instead of atomic increments\n"
|
||||
" -p = enable sync profiler\n"
|
||||
" -d = duration in seconds\n"
|
||||
" -r = range (will be rounded up to pow2)";
|
||||
|
||||
|
|
@ -143,7 +144,7 @@ static void parse_args(int argc, char *argv[])
|
|||
int c;
|
||||
|
||||
for (;;) {
|
||||
c = getopt(argc, argv, "hd:n:mr:");
|
||||
c = getopt(argc, argv, "hd:n:mpr:");
|
||||
if (c < 0) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -160,6 +161,9 @@ static void parse_args(int argc, char *argv[])
|
|||
case 'm':
|
||||
use_mutex = true;
|
||||
break;
|
||||
case 'p':
|
||||
qsp_enable();
|
||||
break;
|
||||
case 'r':
|
||||
range = pow2ceil(atoi(optarg));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue