From owner-svn-src-all@freebsd.org Sat Dec 15 05:47:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40912133657B; Sat, 15 Dec 2018 05:47:23 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7C6A86AE1; Sat, 15 Dec 2018 05:47:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C55B5B109; Sat, 15 Dec 2018 05:47:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF5lMl2076109; Sat, 15 Dec 2018 05:47:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF5lM7J076107; Sat, 15 Dec 2018 05:47:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201812150547.wBF5lM7J076107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 15 Dec 2018 05:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342109 - head/sys/contrib/zstd/lib/compress X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/contrib/zstd/lib/compress X-SVN-Commit-Revision: 342109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D7C6A86AE1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.81 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 05:47:23 -0000 Author: cem Date: Sat Dec 15 05:47:22 2018 New Revision: 342109 URL: https://svnweb.freebsd.org/changeset/base/342109 Log: Revert accidentally included changes in r342108 If you're curious, please follow along in https://reviews.freebsd.org/D18537 . Sorry for the noise. Modified: head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h head/sys/contrib/zstd/lib/compress/zstd_opt.c Modified: head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h ============================================================================== --- head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h Sat Dec 15 05:46:04 2018 (r342108) +++ head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h Sat Dec 15 05:47:22 2018 (r342109) @@ -691,7 +691,6 @@ MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* windo /* debug functions */ -#if 0 MEM_STATIC double ZSTD_fWeight(U32 rawStat) { U32 const fp_accuracy = 8; @@ -715,7 +714,6 @@ MEM_STATIC void ZSTD_debugTable(const U32* table, U32 u, table[u], ZSTD_fWeight(sum) - ZSTD_fWeight(table[u]) ); } } -#endif #if defined (__cplusplus) } Modified: head/sys/contrib/zstd/lib/compress/zstd_opt.c ============================================================================== --- head/sys/contrib/zstd/lib/compress/zstd_opt.c Sat Dec 15 05:46:04 2018 (r342108) +++ head/sys/contrib/zstd/lib/compress/zstd_opt.c Sat Dec 15 05:47:22 2018 (r342109) @@ -53,12 +53,10 @@ MEM_STATIC U32 ZSTD_fracWeight(U32 rawStat) } /* debugging function, @return price in bytes */ -#if 0 MEM_STATIC double ZSTD_fCost(U32 price) { return (double)price / (BITCOST_MULTIPLIER*8); } -#endif static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) { @@ -854,10 +852,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, for ( ; pos <= end ; pos++ ) { U32 const matchPrice = ZSTD_getMatchPrice(offset, pos, optStatePtr, optLevel); U32 const sequencePrice = literalsPrice + matchPrice; -#if 0 DEBUGLOG(7, "rPos:%u => set initial price : %.2f", pos, ZSTD_fCost(sequencePrice)); -#endif opt[pos].mlen = pos; opt[pos].off = offset; opt[pos].litlen = litlen; @@ -883,22 +879,18 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, - ZSTD_litLengthPrice(litlen-1, optStatePtr, optLevel); assert(price < 1000000000); /* overflow check */ if (price <= opt[cur].price) { -#if 0 DEBUGLOG(7, "cPos:%zi==rPos:%u : better price (%.2f<=%.2f) using literal (ll==%u) (hist:%u,%u,%u)", inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]); -#endif opt[cur].mlen = 0; opt[cur].off = 0; opt[cur].litlen = litlen; opt[cur].price = price; memcpy(opt[cur].rep, opt[cur-1].rep, sizeof(opt[cur].rep)); } else { -#if 0 DEBUGLOG(7, "cPos:%zi==rPos:%u : literal would cost more (%.2f>%.2f) (hist:%u,%u,%u)", inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), opt[cur].rep[0], opt[cur].rep[1], opt[cur].rep[2]); -#endif } } @@ -955,10 +947,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, int const price = basePrice + ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); if ((pos > last_pos) || (price < opt[pos].price)) { -#if 0 DEBUGLOG(7, "rPos:%u (ml=%2u) => new better price (%.2f<%.2f)", pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); -#endif while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } /* fill empty positions */ opt[pos].mlen = mlen; opt[pos].off = offset; @@ -967,10 +957,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, ZSTD_STATIC_ASSERT(sizeof(opt[pos].rep) == sizeof(repHistory)); memcpy(opt[pos].rep, &repHistory, sizeof(repHistory)); } else { -#if 0 DEBUGLOG(7, "rPos:%u (ml=%2u) => new price is worse (%.2f>=%.2f)", pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); -#endif if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ } } } }