From owner-svn-src-user@FreeBSD.ORG Wed Oct 1 01:50:24 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9385C528; Wed, 1 Oct 2014 01:50:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8033E3EC; Wed, 1 Oct 2014 01:50:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s911oOK8056243; Wed, 1 Oct 2014 01:50:24 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s911oO1g056242; Wed, 1 Oct 2014 01:50:24 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410010150.s911oO1g056242@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 1 Oct 2014 01:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r272339 - user/marcel/mkimg X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 01:50:24 -0000 Author: marcel Date: Wed Oct 1 01:50:23 2014 New Revision: 272339 URL: http://svnweb.freebsd.org/changeset/base/272339 Log: Remove image_chunk_dump() and its call-site. I used it for debugging in the beginning, but not at the end. So, its value is marginal. Below a performance comparison while running the unit test: x old + new N Min Max Median Avg Stddev x 5 57.48 58.28 57.58 57.736 0.33886576 + 5 46.82 47.61 46.93 47.034 0.32791767 Difference at 95.0% confidence -10.702 +/- 0.486298 -18.5361% +/- 0.842279% (Student's t, pooled s = 0.333437) Modified: user/marcel/mkimg/image.c Modified: user/marcel/mkimg/image.c ============================================================================== --- user/marcel/mkimg/image.c Wed Oct 1 01:18:25 2014 (r272338) +++ user/marcel/mkimg/image.c Wed Oct 1 01:50:23 2014 (r272339) @@ -117,32 +117,6 @@ image_swap_alloc(size_t size) * Image chunk handling. */ -static void -image_chunk_dump(int count) -{ - struct chunk *ch; - - fprintf(stderr, "Dump %d: %u chunks:\n", count, image_nchunks); - STAILQ_FOREACH(ch, &image_chunks, ch_list) { - fprintf(stderr, "\tblk=%jd, sz=%zu, type=%u", - (intmax_t)ch->ch_block, ch->ch_size, ch->ch_type); - switch (ch->ch_type) { - case CH_TYPE_ZEROES: - fputc('\n', stderr); - break; - case CH_TYPE_FILE: - fprintf(stderr, "; ofs=%jd, fd=%d\n", - (intmax_t)ch->ch_u.file.ofs, ch->ch_u.file.fd); - break; - case CH_TYPE_MEMORY: - fprintf(stderr, "; ptr=%p\n", ch->ch_u.mem.ptr); - break; - default: - abort(); - } - } -} - static struct chunk * image_chunk_find(lba_t blk) { @@ -650,9 +624,7 @@ image_data(lba_t blk, lba_t size) lba_t image_get_size(void) { - static int count = 0; - image_chunk_dump(count++); return (image_size); }