qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1321464] [NEW] qemu/block/qcow2.c:1942: possible performance problem ?
@ 2014-05-20 21:48 dcb
  2014-05-20 23:21 ` [Qemu-devel] [Bug 1321464] " Max Reitz
  2017-10-03  9:42 ` Thomas Huth
  0 siblings, 2 replies; 4+ messages in thread
From: dcb @ 2014-05-20 21:48 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

I just ran static analyser cppcheck over today (20140520) qemu source
code.

It said many things, including

[qemu/block/qcow2.c:1942] -> [qemu/block/qcow2.c:1943]: (performance) Buffer 'pad_buf' is being writ
ten before its old content has been used.

Source code is

            memset(pad_buf, 0, s->cluster_size);
            memcpy(pad_buf, buf, nb_sectors * BDRV_SECTOR_SIZE);

Worth tuning ?

Similar problem here

[qemu/block/qcow.c:815] -> [qemu/block/qcow.c:816]: (performance) Buffer 'pad_buf' is being written 
before its old content has been used.

and

[qemu/hw/i386/acpi-build.c:1265] -> [qemu/hw/i386/acpi-build.c:1267]: (performance) Buffer 'dsdt' is
 being written before its old content has been used.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1321464

Title:
  qemu/block/qcow2.c:1942: possible performance problem ?

Status in QEMU:
  New

Bug description:
  I just ran static analyser cppcheck over today (20140520) qemu source
  code.

  It said many things, including

  [qemu/block/qcow2.c:1942] -> [qemu/block/qcow2.c:1943]: (performance) Buffer 'pad_buf' is being writ
  ten before its old content has been used.

  Source code is

              memset(pad_buf, 0, s->cluster_size);
              memcpy(pad_buf, buf, nb_sectors * BDRV_SECTOR_SIZE);

  Worth tuning ?

  Similar problem here

  [qemu/block/qcow.c:815] -> [qemu/block/qcow.c:816]: (performance) Buffer 'pad_buf' is being written 
  before its old content has been used.

  and

  [qemu/hw/i386/acpi-build.c:1265] -> [qemu/hw/i386/acpi-build.c:1267]: (performance) Buffer 'dsdt' is
   being written before its old content has been used.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1321464/+subscriptions

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-03  9:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 21:48 [Qemu-devel] [Bug 1321464] [NEW] qemu/block/qcow2.c:1942: possible performance problem ? dcb
2014-05-20 23:21 ` [Qemu-devel] [Bug 1321464] " Max Reitz
2014-05-23 12:27   ` Stefan Hajnoczi
2017-10-03  9:42 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).