Received: from eggs.gnu.org ([2001:4830:134:3::10]:35909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wms0X-0005ys-Mn for qemu-devel@nongnu.org; Tue, 20 May 2014 17:55:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wms0R-0004Ek-KI for qemu-devel@nongnu.org; Tue, 20 May 2014 17:55:37 -0400 Received: from indium.canonical.com ([91.189.90.7]:51959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wms0R-0004EU-24 for qemu-devel@nongnu.org; Tue, 20 May 2014 17:55:31 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1Wms0Q-0008UC-5y for ; Tue, 20 May 2014 21:55:30 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 1EA312E80C3 for ; Tue, 20 May 2014 21:55:30 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 20 May 2014 21:48:51 -0000 From: dcb <1321464@bugs.launchpad.net> Sender: bounces@canonical.com References: <20140520214851.1935.57767.malonedeb@gac.canonical.com> Message-Id: <20140520214851.1935.57767.malonedeb@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1321464] [NEW] qemu/block/qcow2.c:1942: possible performance problem ? Reply-To: Bug 1321464 <1321464@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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) Buffe= r '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 'p= ad_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]: (perf= ormance) 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) Buf= fer '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]: (pe= rformance) 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