[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 6/6] gzip: drop huffman code table tracking


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 17 Apr 2024 10:37:16 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1713364655; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=zy3QMlmFlvRnd4VIdLPcMDUc+UIQW7lW3Z2AoT0uE1Y=; b=R6p8+5CjDPaXgWndfHry9vJ53WpopLeRCvmsmRkG+r+Ob8pyRaIJa87G6mC3l6plTcOcKkaKouBuPMDz+T0n1OU2jbUz/EoCg9zkAMlRvvjqFXsuOqt60Mg472kcVITxPc2K3CzMVG04w9MPErH07emw+vU7hySrbd7VeQQvQXY=
  • Arc-seal: i=1; a=rsa-sha256; t=1713364655; cv=none; d=zohomail.com; s=zohoarc; b=GQUI1Xad/9W+P86/QcwV2bVy5l9v8UjrYvnPNS6etEkyZOILzBph9gqpzUQcCrG6GN8lR10G35FA3tOetf7IZfdLrV44ZqrkJz8ckUz0nMZaDL5xvQ56/oW8DTsqt/Lkka9a3AtvGN+iGA2xGZWi+ogNuDtV7wdeFIEMxwHBnSA=
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivered-to: dpsmith@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 17 Apr 2024 14:39:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The "tracking" bits does not appear to be used, so dropping from the code.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
 xen/common/gzip/inflate.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/xen/common/gzip/inflate.c b/xen/common/gzip/inflate.c
index c18ce20210b0..15bc187c2bbe 100644
--- a/xen/common/gzip/inflate.c
+++ b/xen/common/gzip/inflate.c
@@ -264,8 +264,6 @@ static const int dbits = 6;          /* bits in base 
distance lookup table */
 #define BMAX 16         /* maximum bit length of any code (16 for explode) */
 #define N_MAX 288       /* maximum number of codes in any set */
 
-static unsigned __initdata hufts;      /* track memory usage */
-
 /*
  * Given a list of code lengths and a maximum table size, make a set of
  * tables to decode that set of codes.  Return zero on success, one if
@@ -445,7 +443,6 @@ static int __init huft_build(
                     goto out;
                 }
                 DEBG1("4 ");
-                hufts += z + 1;         /* track memory usage */
                 *t = q + 1;             /* link to list for huft_free() */
                 *(t = &(q->v.t)) = (struct huft *)NULL;
                 u[h] = ++q;             /* table starts after link */
@@ -1028,15 +1025,12 @@ static int __init inflate(struct gzip_state *s)
     /* decompress until the last block */
     h = 0;
     do {
-        hufts = 0;
 #ifdef ARCH_HAS_DECOMP_WDOG
         arch_decomp_wdog();
 #endif
         r = inflate_block(s, &e);
         if (r)
             return r;
-        if (hufts > h)
-            h = hufts;
     } while (!e);
 
     /* Undo too much lookahead. The next read will be byte aligned so we
-- 
2.30.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.