maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11002
Re: [Commits] b2571e5: Removed ut_crc32_byte_by_byte: never used
Indeed, the functions and function pointers were never used.
On Thu, Nov 23, 2017 at 12:36 PM, Sergey Vojtovich <svoj@xxxxxxxxxxx> wrote:
> revision-id: b2571e534f9eed873cc9b1ce5f48b109c1ee0fcc
> (mariadb-10.3.2-65-gb2571e5)
> parent(s): 0bfe5e349210c01404d20dfc8660d5224bd9c658
> committer: Sergey Vojtovich
> timestamp: 2017-11-23 14:35:50 +0400
> message:
>
> Removed ut_crc32_byte_by_byte: never used
>
> ---
> storage/innobase/include/ut0crc32.h | 4 ----
> storage/innobase/ut/ut0crc32.cc | 48 ------------------------------
> -------
> 2 files changed, 52 deletions(-)
>
> diff --git a/storage/innobase/include/ut0crc32.h
> b/storage/innobase/include/ut0crc32.h
> index 36b389b..509ac09 100644
> --- a/storage/innobase/include/ut0crc32.h
> +++ b/storage/innobase/include/ut0crc32.h
> @@ -51,10 +51,6 @@ extern ut_crc32_func_t ut_crc32;
> when converting byte strings to integers internally. */
> extern ut_crc32_func_t ut_crc32_legacy_big_endian;
>
> -/** Pointer to CRC32-byte-by-byte calculation function (byte order
> agnostic,
> -but very slow). */
> -extern ut_crc32_func_t ut_crc32_byte_by_byte;
> -
> extern const char* ut_crc32_implementation;
>
> #endif /* ut0crc32_h */
> diff --git a/storage/innobase/ut/ut0crc32.cc b/storage/innobase/ut/
> ut0crc32.cc
> index 386d32f..6383e6d 100644
> --- a/storage/innobase/ut/ut0crc32.cc
> +++ b/storage/innobase/ut/ut0crc32.cc
> @@ -93,10 +93,6 @@ ut_crc32_func_t ut_crc32;
> when converting byte strings to integers internally. */
> ut_crc32_func_t ut_crc32_legacy_big_endian;
>
> -/** Pointer to CRC32-byte-by-byte calculation function (byte order
> agnostic,
> -but very slow). */
> -ut_crc32_func_t ut_crc32_byte_by_byte;
> -
> /** Text description of CRC32 implementation */
> const char* ut_crc32_implementation;
>
> @@ -409,26 +405,6 @@ ut_crc32_legacy_big_endian_hw(
>
> return(~crc);
> }
> -
> -/** Calculates CRC32 using hardware/CPU instructions.
> -This function processes one byte at a time (very slow) and thus it does
> -not depend on the byte order of the machine.
> -@param[in] buf data over which to calculate CRC32
> -@param[in] len data length
> -@return CRC-32C (polynomial 0x11EDC6F41) */
> -uint32_t
> -ut_crc32_byte_by_byte_hw(
> - const byte* buf,
> - ulint len)
> -{
> - uint32_t crc = 0xFFFFFFFFU;
> -
> - while (len > 0) {
> - ut_crc32_8_hw(&crc, &buf, &len);
> - }
> -
> - return(~crc);
> -}
> #endif /* defined(__GNUC__) && defined(__x86_64__) */
>
> /* CRC32 software implementation. */
> @@ -669,28 +645,6 @@ ut_crc32_legacy_big_endian_sw(
> return(~crc);
> }
>
> -/** Calculates CRC32 in software, without using CPU instructions.
> -This function processes one byte at a time (very slow) and thus it does
> -not depend on the byte order of the machine.
> -@param[in] buf data over which to calculate CRC32
> -@param[in] len data length
> -@return CRC-32C (polynomial 0x11EDC6F41) */
> -uint32_t
> -ut_crc32_byte_by_byte_sw(
> - const byte* buf,
> - ulint len)
> -{
> - uint32_t crc = 0xFFFFFFFFU;
> -
> - ut_a(ut_crc32_slice8_table_initialized);
> -
> - while (len > 0) {
> - ut_crc32_8_sw(&crc, &buf, &len);
> - }
> -
> - return(~crc);
> -}
> -
> /********************************************************************//**
> Initializes the data structures used by ut_crc32*(). Does not do any
> allocations, would not hurt if called twice, but would be pointless. */
> @@ -701,7 +655,6 @@ ut_crc32_init()
> ut_crc32_slice8_table_init();
> ut_crc32 = ut_crc32_sw;
> ut_crc32_legacy_big_endian = ut_crc32_legacy_big_endian_sw;
> - ut_crc32_byte_by_byte = ut_crc32_byte_by_byte_sw;
> ut_crc32_implementation = "Using generic crc32 instructions";
>
> #if defined(__GNUC__) && defined(__x86_64__)
> @@ -735,7 +688,6 @@ ut_crc32_init()
> if (features_ecx & 1 << 20) {
> ut_crc32 = ut_crc32_hw;
> ut_crc32_legacy_big_endian = ut_crc32_legacy_big_endian_hw;
> - ut_crc32_byte_by_byte = ut_crc32_byte_by_byte_hw;
> ut_crc32_implementation = "Using SSE2 crc32 instructions";
> }
>
> _______________________________________________
> commits mailing list
> commits@xxxxxxxxxxx
> https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits
--
Marko Mäkelä, Lead Developer InnoDB
MariaDB Corporation
DON’T MISS
M|18
MariaDB User Conference
February 26 - 27, 2018
New York City
https://m18.mariadb.com/