fuzz: double the IOs to remove for every loop
authorQiuhao Li <Qiuhao.Li@outlook.com>
Mon, 11 Jan 2021 06:11:47 +0000 (14:11 +0800)
committerThomas Huth <thuth@redhat.com>
Mon, 11 Jan 2021 13:59:21 +0000 (14:59 +0100)
commit7b339f287fb73a628f0862823b880a6145faa6ec
treea072c498a71aa23cbbe14bfbea07438c672402bf
parent22ec0c696fd28e8978d0d64dd038eed33b974366
fuzz: double the IOs to remove for every loop

Instead of removing IO instructions one by one, we can try deleting multiple
instructions at once. According to the locality of reference, we double the
number of instructions to remove for the next round and recover it to one
once we fail.

This patch is usually significant for large input.

Test with quadrupled trace input at:
  https://bugs.launchpad.net/qemu/+bug/1890333/comments/1

Patched 1/6 version:
  real  0m45.904s
  user  0m16.874s
  sys   0m10.042s

Refined version:
  real  0m11.412s
  user  0m6.888s
  sys   0m3.325s

Signed-off-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Tested-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <SYCPR01MB350280A67BB55C3FADF173E3FCAB0@SYCPR01MB3502.ausprd01.prod.outlook.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
scripts/oss-fuzz/minimize_qtest_trace.py