- Dec 20, 2017
-
-
Noel Gordon authored
Comparison of a pointer difference to a size_t cause the compiler to whine about the different signs: 'long' and 'unsigned long' in this case. Fix that by using ptrdff_t for these comparisons. No change in behavior, no new tests. Tbr: mtklein@chromium.org Bug: 796470 Change-Id: Ie585ba45f1e09f31f7d4cf48c41f2378a1b0808b Reviewed-on: https://chromium-review.googlesource.com/836291 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:
Sam McNally <sammc@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#525312} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: f15491d8649d1fc27ae2d0d832c9bb6813b04ea0
-
Noel Gordon authored
MSVC noted the unsigned |n| = size_t |blocks| could be a possible loss in precision. No loss in precision occurs since (n > blocks) at this point: |blocks| fits in an unsigned type. To silence compiler warnings, first update BUILD.gn for the adler SIMD code to use chromium compiler:chromium_code rule (more error checking), rather than the permissive "compiler:no_chromium_code" rule. Then cast |blocks| to unsigned on assigment to |n| (this is safe to do as mentioned above). No change in behavior, no new tests. Tbr: cblume@chromium.org Bug: 762564 Change-Id: Ia97120bcca206287fd42b97674f8a6215283e4a5 Reviewed-on: https://chromium-review.googlesource.com/835927 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:
Sam McNally <sammc@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#525285} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 0cb9a22e2fb55e092342192d66f7e33c14432d27
-
- Dec 13, 2017
-
-
Noel Gordon authored
Speculative fix: back off from using -O3 on Android for the inflate chunk copy code to see if -O3 caused the perf bot regression on the Android One bot, http://bit.ly/2AfaxhG Bug: 772870 Change-Id: I06bd941224dacbc5d7024a65934faaa53e4a4ce5 Reviewed-on: https://chromium-review.googlesource.com/823503 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:
Mike Klein <mtklein@chromium.org> Reviewed-by:
Chris Blume <cblume@chromium.org> Reviewed-by:
Noel Gordon <noel@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#523679} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 53edf03e13a1569f146f136c9e43bc6e476bf33e
-
- Dec 12, 2017
-
-
Lei Zhang authored
Change-Id: I69bbbfa9d4c317a522a39e097b478d0f80e61fad Reviewed-on: https://chromium-review.googlesource.com/818606 Reviewed-by:
Scott Graham <scottmg@chromium.org> Reviewed-by:
Chris Blume <cblume@chromium.org> Reviewed-by:
Max Moroz <mmoroz@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#523273} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 1295fa76d2e7c8efc134219dde4a55fc0630f0cb
-
- Dec 08, 2017
-
-
Noel Gordon authored
Using SSE2 chunk copies improves the decoding rate of the PNG 140 corpus by an average 17%, giving a total 37% performance increase when combined with SIMD adler32 code (https://crbug.com/772870#c3 for details). Move the arm-specific code back into the main chunk copy code and generalize the SIMD parts of chunkset_core() with inline function calls for ARM, and Intel SSE2 devices. This removes the TODO from arm/chunkcopy_arm.h, and that file can be deleted as a result. Add SSE2 vector load / store SSE helpers for chunkset_core(). The existing NEON load code had alignment issues, as noted in review. Fix that: use unaligned loads in the ARM helper code. Change chunkcopy.h to use __builtin_memcpy if it's available, use zmemcpy otherwise such as on MSVC. Also call x86_check_features() in inflateInit2_() to keep the adler32 SIMD code path enabled. Update BUILD.gn to conditionally compile the SIMD chunk copy code on Intel SSE2 and ARM NEON devices. Update names.h to add the new symbol defined by the inflate chunk copy code path. Code had various comment styles; pick one and use it consistently everywhere. Add inffast_chunk.h TODO(cblume). Bug: 772870 Change-Id: I47004c68ee675acf418825fb0e1f8fa8018d4342 Reviewed-on: https://chromium-review.googlesource.com/708834 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:
Chris Blume <cblume@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#522764} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: c293a3255eb27dee8879f85f2c45dedff58e2452
-
- Nov 30, 2017
-
-
Boris Sazonov authored
This reverts commit 35988c821c051a57e30c76f9fcd87b7b677bd9bd. Reason for revert: broke build ('cpu-features.h' not found) https://uberchromegw.corp.google.com/i/internal.client.clank/builders/x64-builder/builds/13697 Original change's description: > Using ARMv8 CRC32 specific instruction > > CRC32 affects performance for both image decompression (PNG) > as also in general browsing while accessing websites that serve > content using compression (i.e. Content-Encoding: gzip). > > This patch implements an optimized CRC32 function using the > dedicated instruction available in ARMv8. This instruction is available > in new Android devices featuring an ARMv8 SoC, like Nexus 5x and > Google Pixel. > > It should be between 6x (A53: 116ms X 22ms for a 4Kx4Kx4 buffer) to > 10x faster (A72: 91ms x 9ms) than the C implementation currently used > by zlib. > > PNG decoding performance gains should be around 5-9%. > > Finally it also introduces code to perform the ARM CPU features detection > using getauxval()@Linux/CrOS or android_getCpuFeatures(). We pre-built > and link the CRC32 instruction dependent code but will decide if to > use it at run time. > > If the feature is not supported, we fallback to the C implementation. > > This approach allows to use the instruction in both 32bits and 64bits > builds and works fine either in ARMv7 or ARMv8 processor. I tested the > generated Chromium apk in both a ARMv7 (Nexus 4 and 6) and ARMv8 (Nexus 5x and > Google Pixel). > > Change-Id: I069408ebc06c49a3c2be4ba3253319e025ee09d7 > Bug: 709716 > Reviewed-on: https://chromium-review.googlesource.com/612629 > Reviewed-by:
Chris Blume <cblume@chromium.org> > Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> > Cr-Commit-Position: refs/heads/master@{#520377} TBR=agl@chromium.org,noel@chromium.org,cavalcantii@chromium.org,cblume@chromium.org,mtklein@chromium.org,adenilson.cavalcanti@arm.com Change-Id: Ief2c32df5c8a37635f937cd6a671f5574f5a53a3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 709716 Reviewed-on: https://chromium-review.googlesource.com/799930 Reviewed-by:
Chris Blume <cblume@chromium.org> Reviewed-by:
Boris Sazonov <bsazonov@chromium.org> Commit-Queue: Boris Sazonov <bsazonov@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#520497} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: e7d9a4649bde6f047105d29f0026dd8c3d54143a
-
Adenilson Cavalcanti authored
CRC32 affects performance for both image decompression (PNG) as also in general browsing while accessing websites that serve content using compression (i.e. Content-Encoding: gzip). This patch implements an optimized CRC32 function using the dedicated instruction available in ARMv8. This instruction is available in new Android devices featuring an ARMv8 SoC, like Nexus 5x and Google Pixel. It should be between 6x (A53: 116ms X 22ms for a 4Kx4Kx4 buffer) to 10x faster (A72: 91ms x 9ms) than the C implementation currently used by zlib. PNG decoding performance gains should be around 5-9%. Finally it also introduces code to perform the ARM CPU features detection using getauxval()@Linux/CrOS or android_getCpuFeatures(). We pre-built and link the CRC32 instruction dependent code but will decide if to use it at run time. If the feature is not supported, we fallback to the C implementation. This approach allows to use the instruction in both 32bits and 64bits builds and works fine either in ARMv7 or ARMv8 processor. I tested the generated Chromium apk in both a ARMv7 (Nexus 4 and 6) and ARMv8 (Nexus 5x and Google Pixel). Change-Id: I069408ebc06c49a3c2be4ba3253319e025ee09d7 Bug: 709716 Reviewed-on: https://chromium-review.googlesource.com/612629 Reviewed-by:
Chris Blume <cblume@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#520377} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 35988c821c051a57e30c76f9fcd87b7b677bd9bd
-
- Nov 15, 2017
-
-
Chris Blume authored
A call to deflateSetDictionary() must happen immediately after a call to deflateInit(). The zlib_deflate_set_dictionary_fuzzer is currently not calling deflateInit() and thus the stream it wants to use is uninitialized. This patch fixes this by initializing the stream. Bug: 784148 Change-Id: I0bd726201bdf495fbf66bee9e763ca1baaf57ac6 Reviewed-on: https://chromium-review.googlesource.com/769155 Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Max Moroz <mmoroz@chromium.org> Commit-Queue: Max Moroz <mmoroz@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#516870} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: e69e4be87ec5639196a20ed99b2b3335f0fdc21e
-
- Nov 13, 2017
-
-
Chris Blume authored
zlib's deflate requires non-zero length inputs. As a result, the deflate fuzzer was asserting on the error value indicating an invalid input when the fuzzer provided a zero-length input. This change will exit early when the input is zero-length so it matches the precondition required for deflate. BUG=784148 Change-Id: I12558bb47c4bc5e5147d07707fe01a0e8feb314b Reviewed-on: https://chromium-review.googlesource.com/766474 Commit-Queue: Chris Blume <cblume@chromium.org> Reviewed-by:
Max Moroz <mmoroz@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#516048} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 0df464cb0780e6cd6ee6e6ad8a1718b5747efc19
-
- Nov 10, 2017
-
-
Chris Blume authored
zlib_inflate_fuzzer currently asserts when the call to inflate() fails. However, invalid inputs are expected in fuzz testing. So inflate() failing is an expected case here. Remove the assert on inflate() succeeding. BUG=780898 Change-Id: If62bff55f31a67d2fefa4e780f283f97f88f7707 Reviewed-on: https://chromium-review.googlesource.com/753133 Commit-Queue: Max Moroz <mmoroz@chromium.org> Reviewed-by:
Max Moroz <mmoroz@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#515383} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 47f7d7eb2c2c3e313b3423786802f6372e4891a5
-
- Nov 04, 2017
-
-
Chris Blume authored
We want to cover all of zlib's external APIs. deflate() currently isn't covered. BUG=779648 Change-Id: I1d1ea523aa6caa2e468b9641dbf7f32c54724f38 Reviewed-on: https://chromium-review.googlesource.com/744330 Commit-Queue: Chris Blume <cblume@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Max Moroz <mmoroz@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#514045} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 66ca64074454e98829343bb2156b07958570b722
-
- Nov 03, 2017
-
-
Chris Blume authored
We want to cover all of zlib's external APIs. deflateSetDictionary() currently isn't covered. BUG=780926 Change-Id: Ie2da648a4d58fca0745c814b004d3859e81a85a6 Reviewed-on: https://chromium-review.googlesource.com/752070 Reviewed-by:
Max Moroz <mmoroz@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Commit-Queue: Chris Blume <cblume@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#513917} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 425d4cd82b3cdee276acf851d46d3eaf7662946a
-
Adenilson Cavalcanti authored
This handles the case where a zlib user could rely on InflateBack API to decompress content. The NEON optimization assumes that it can perform wide stores, sometimes overwriting data on the output pointer (but never overflowing the buffer end as it has enough room for the write). For infback there is no such guarantees (i.e. no extra wiggle room), which can result in illegal operations. This patch fixes the potential issue by falling back to the non-optimized code for such cases. Also it adds some comments about the entry assumptions in inflate and writes out a defined value at the write buffer to identify where the real data has ended (helpful while debugging). Bug: 769880 Change-Id: I08130e4d012e55fb1a114394b88df7e9d8a6542f Reviewed-on: https://chromium-review.googlesource.com/749732 Reviewed-by:
Chris Blume <cblume@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#513830} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 0bb11040792edc5b28fcb710fc4c01fedd98c97c
-
- Nov 02, 2017
-
-
Chris Blume authored
Now that zlib_uncompress_fuzzer.cc is under the zlib directory, that "zlib_" in the file name is no longer useful. Rename it to remove that and be more concise. BUG=779823 Change-Id: I8169fae4ff81c86b162c1978bcc288a970eb6eb4 Reviewed-on: https://chromium-review.googlesource.com/750190 Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Max Moroz <mmoroz@chromium.org> Commit-Queue: Chris Blume <cblume@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#513389} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: e08208b15fc3c0b30c9adcab19c79a6746f68f8d
-
Chris Blume authored
We want to cover all of zlib's external APIs. inflate() currently isn't covered. BUG=779676 Change-Id: Ic8ea52f189a9870ea643d8d720a8e49f79f85422 Reviewed-on: https://chromium-review.googlesource.com/744338 Commit-Queue: Chris Blume <cblume@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Max Moroz <mmoroz@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#513374} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 1d1fe9219bcd06691028d3f84ac35a2d76b3f3b5
-
- Oct 31, 2017
-
-
Chris Blume authored
Zlib's fuzzer (and other tests) should all be close to the code it is related to. Move zlib_uncompress_fuzzer into third_party/zlib. BUG=779823 Change-Id: I960561b5cd83a629e9d296f56c75c7bfcec2663a Reviewed-on: https://chromium-review.googlesource.com/744597 Reviewed-by:
Max Moroz <mmoroz@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Commit-Queue: Chris Blume <cblume@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#512992} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 616f37bac71ba5ab23773f49989298d24cc2e136
-
- Oct 30, 2017
-
-
Adenilson Cavalcanti authored
The NEON specific code will be hosted in the folder 'contrib/optimizations/arm' while the platform independent C code is hosted in the upper directory. This allows to easily implement the inffast optimization for other architectures by simply implementing 2 functions and including the necessary header in chunk_copy.h (that is used by inflate and inffast). The idea is with time to move all optimizations to this new folder. Bug: 769880 Change-Id: I404ec0fdf3f6867c9c124da859ca38bf57b25447 Reviewed-on: https://chromium-review.googlesource.com/740907 Reviewed-by:
Chris Blume <cblume@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#512542} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 626df311481f7fac07b58799fbc94e09c848f01d
-
- Oct 18, 2017
-
-
Jay Civelli authored
When using zip::Zip() with an IPC based FileAccessor, zipping directories with large number of files triggers many IPC calls making the entire operation significantly slower than with direct file access. In order to alleviate this performance hit, this patch groups file reads by modifying the FileAccessor read method so it reads multiple files at once. zip::Zip() can then group these reads when writing the ZIP file. The writing code has been factored out into a new ZipWriter class to make that code more readable. Bug: 773310 Change-Id: I8121980bf05d87a174c63164840ec6bf325c7e52 Reviewed-on: https://chromium-review.googlesource.com/719356 Commit-Queue: Jay Civelli <jcivelli@chromium.org> Reviewed-by:
Ilya Sherman <isherman@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#509693} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: d0cb5e408404d652492171bbed9c8ecd3d44a9aa
-
- Oct 13, 2017
-
-
Jay Civelli authored
This reverts commit adb61db19020ed8ecee5e91b1a0ea4c924ae2988. Fixed the ZipTest.ZipWithFileAccessor test. Bug: 772815 Tbr: isherman Change-Id: Iffc8e0ec07c590b69fc025bc35c6fe2db1236858 Reviewed-on: https://chromium-review.googlesource.com/718079 Reviewed-by:
Jay Civelli <jcivelli@chromium.org> Commit-Queue: Jay Civelli <jcivelli@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#508720} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 602af595579fe7cc51fe2434c3e35ecebbc2a3c4
-
Jay Civelli authored
This reverts commit 513d84a6fa9942743df99c46c33ea5c863a220d4. Reason for revert: it breaks the unit-tests. Original change's description: > Relanding "Abstrating file access operation in zip creation." > > Disabled the added conditions that caused the tests to fail (only on the > build bots) and added logs for investigation. > > Bug: 772815 > Tbr: isherman > Change-Id: I1f20bfe40288b6822397d469863deb643a93b17d > Reviewed-on: https://chromium-review.googlesource.com/716597 > Commit-Queue: Jay Civelli <jcivelli@chromium.org> > Reviewed-by:
Jay Civelli <jcivelli@chromium.org> > Reviewed-by:
Ilya Sherman <isherman@chromium.org> > Cr-Commit-Position: refs/heads/master@{#508539} TBR=jcivelli@chromium.org,isherman@chromium.org Change-Id: Ife1a2ebe47b29b4231125aef4058c489d254baf4 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 772815 Reviewed-on: https://chromium-review.googlesource.com/717737 Reviewed-by:
Jay Civelli <jcivelli@chromium.org> Commit-Queue: Jay Civelli <jcivelli@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#508578} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: adb61db19020ed8ecee5e91b1a0ea4c924ae2988
-
- Oct 12, 2017
-
-
Jay Civelli authored
Disabled the added conditions that caused the tests to fail (only on the build bots) and added logs for investigation. Bug: 772815 Tbr: isherman Change-Id: I1f20bfe40288b6822397d469863deb643a93b17d Reviewed-on: https://chromium-review.googlesource.com/716597 Commit-Queue: Jay Civelli <jcivelli@chromium.org> Reviewed-by:
Jay Civelli <jcivelli@chromium.org> Reviewed-by:
Ilya Sherman <isherman@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#508539} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 513d84a6fa9942743df99c46c33ea5c863a220d4
-
Keishi Hattori authored
This reverts commit 91ac47fceb859a3804b38ec4f3befcef0f29b019. Reason for revert: Failing unit_tests ZipTest.UnzipUncompressed and others crbug.com/773963 Original change's description: > Abstrating file access operation in zip creation. > > Abstracting file access operations when creating ZIP files. This is > going to be useful when ZIP operations are done by a Mojo service in a > sandboxed environment and can only access files through IPC. > > In order to make the API cleaner, introduced a parameter class that > lets caller specify which options to use. > > Bug: 772815 > Change-Id: I229291a0c37bfee8fd29fe894a8118c91afab074 > Reviewed-on: https://chromium-review.googlesource.com/706282 > Commit-Queue: Jay Civelli <jcivelli@chromium.org> > Reviewed-by:
Ilya Sherman <isherman@chromium.org> > Reviewed-by:
Chris Blume <cblume@chromium.org> > Cr-Commit-Position: refs/heads/master@{#508233} TBR=jcivelli@chromium.org,isherman@chromium.org,satorux@chromium.org,cblume@chromium.org Change-Id: I91fb4aa3b5920eac88e1ba6900a441961117c632 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 772815 Reviewed-on: https://chromium-review.googlesource.com/715036 Reviewed-by:
Keishi Hattori <keishi@chromium.org> Commit-Queue: Keishi Hattori <keishi@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#508256} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: b092fa9950a914b79d01ad59e6ec3f9c8e18b0db
-
Jay Civelli authored
Abstracting file access operations when creating ZIP files. This is going to be useful when ZIP operations are done by a Mojo service in a sandboxed environment and can only access files through IPC. In order to make the API cleaner, introduced a parameter class that lets caller specify which options to use. Bug: 772815 Change-Id: I229291a0c37bfee8fd29fe894a8118c91afab074 Reviewed-on: https://chromium-review.googlesource.com/706282 Commit-Queue: Jay Civelli <jcivelli@chromium.org> Reviewed-by:
Ilya Sherman <isherman@chromium.org> Reviewed-by:
Chris Blume <cblume@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#508233} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 91ac47fceb859a3804b38ec4f3befcef0f29b019
-
- Sep 29, 2017
-
-
Noel Gordon authored
Add SSSE3 implementation of the adler32 checksum, suitable for both large workloads, and small workloads commonly seen during PNG image decoding. Add a NEON implementation. Speed is comparable to the serial adler32 computation but near 64 bytes of input data, the SIMD code paths begin to be faster than the serial path: 3x faster at 256 bytes of input data, to ~8x faster for 1M of input data (~4x on ARMv8 NEON). For the PNG 140 image corpus, PNG decoding speed is ~8% faster on average on the desktop machines tested, and ~2% on an ARMv8 Pixel C Android (N) tablet, https://crbug.com/762564#c41 Update x86.{c,h} to runtime detect SSSE3 support and use it to enable the adler32_simd code path and update inflate.c to call x86_check_features(). Update the name mangler file names.h for the new symbols added, add FIXME about simd.patch. Ignore data alignment in the SSSE3 case since unaligned access is no longer penalized on current generation Intel CPU. Use it in the NEON case however to avoid the extra costs of unaligned memory access on ARMv8/v7. NEON credits: the v_s1/s2 vector component accumulate code was provided by Adenilson Cavalcanti. The uint16 column vector sum code is from libdeflate with corrections to process NMAX input bytes which improves performance by 3% for large buffers. Update BUILD.gn to put the code in its own source set, and add it conditionally to the zlib library build rule. On ARM, build the SIMD with max-speed config to produce the smallest code. No change in behavior, covered by many existing tests. Bug: 762564 Change-Id: I14a39940ae113b5a67ba70a99c3741e289b1796b Reviewed-on: https://chromium-review.googlesource.com/660019 Commit-Queue: Chris Blume <cblume@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Chris Blume <cblume@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#505447} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 09b784fd12f255a9da38107ac6e0386f4dde6d68
-
Adenilson Cavalcanti authored
In inflate_fast() the output pointer always has plenty of room to write. This means that so long as the target is capable, wide un-aligned loads and stores can be used to transfer several bytes at once. When the reference distance is too short simply unroll the data a little to increase the distance. Patch by Simon Hosie. PNG decoding performance gains should be around 30-33%. This also includes the fix reported in madler/zlib#245. Bug: 697280 Change-Id: I90a9866cc56aa766df5de472cd10c007f4b560d8 Reviewed-on: https://chromium-review.googlesource.com/689961 Reviewed-by:
Chris Blume <cblume@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#505276} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 78104f4d73e3bbb4155fa804d00ed66682180556
-
- Sep 28, 2017
-
-
Adenilson Cavalcanti authored
No need to call the Adler32 checksum function, just set the struct field to the expected value. Plus some cleanup in the README file (the idea is that this file won't be touched for new patches). Upstream bug: madler/zlib#245 Bug: 697481 Change-Id: Ic495c92c9ca1b5ab8a4d23a8ae29141f4617c091 Reviewed-on: https://chromium-review.googlesource.com/688501 Reviewed-by:
Chris Blume <cblume@chromium.org> Commit-Queue: Chris Blume <cblume@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#504897} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: ee376c65abdd5afe787bfb63af9f2e82fdc35c2e
-
- Sep 21, 2017
-
-
Adenilson Cavalcanti authored
The idea is to help avoid constant merge conflicts in new patches on top of Chromium's zlib. Plus adding instructions on how to generate a patch file. Bug: 764094 Change-Id: I90260c7b6514171c4cc927a0299acf82b4ca6c2b Reviewed-on: https://chromium-review.googlesource.com/677495 Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#503523} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: e4fd3cb6f5a3998fef542abb432dc39352708a3c
-
- Sep 19, 2017
-
-
Chris Blume authored
Zlib's inffast uses a handful of magic numbers. It would be easier to read and maintain if these magic numbers were instead #defines. NigelTao@ wrote this code to clean up the magic numbers in https://chromium-review.googlesource.com/c/chromium/src/+/601694 Nigel gave me permission to make a separate pull request to separate out just the magic number cleaning. BUG=764431 Change-Id: I0a62e31e98d4f3afcc64bd096e62a4b4b175644b Reviewed-on: https://chromium-review.googlesource.com/663424 Commit-Queue: Chris Blume <cblume@google.com> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#502982} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 5d7c2b78db0e96c769dee8d4ed3a9aeac8ef21d5
-
- Sep 16, 2017
-
-
Mike Klein authored
This reverts commit 0397489124ce7e6aced020f8b85f5034c7d5f49b. Reason for revert: appears to break Cronet. Original change's description: > Reland "zlib: inflate using wider loads and stores" > > This reverts commit e1f30a329eccf19ce1c8772e873abf88970cb65c. > > Reason for revert: This patch was originally reverted because > we have an ARMv6 build target (part of Cronet) which > incorrectly set NEON support in our build files. As a result, > the NEON intrinsics were included despite ARMv6 not > supporting NEON. > > The build problem was addressed here: > https://chromium-review.googlesource.com/c/chromium/src/+/639931 > > Now that ARMv6 builds do not set NEON support, these zlib > changes (which are only applied if NEON support is set in the > build) will not cause errors on ARMv6 targets. > > BUG=697280 > > Original change's description: > > zlib: inflate using wider loads and stores > > > > In inflate_fast() the output pointer always has plenty of room to write. > > This means that so long as the target is capable, wide un-aligned > > loads and stores can be used to transfer several bytes at once. > > > > When the reference distance is too short simply unroll the data a > > little to increase the distance. Patch by Simon Hosie. > > > > PNG decoding performance gains should be around 30-33%. > > > > BUG=697280 > > > > Change-Id: I59854eb25d2b1e43561c8a2afaf9175bf10cf674 > > Reviewed-on: https://chromium-review.googlesource.com/627098 > > Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> > > Reviewed-by:
Mike Klein <mtklein@chromium.org> > > Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#497866} > > > > Change-Id: I0b4cd1a393464c960c6a1e48a022a20340781e75 > Reviewed-on: https://chromium-review.googlesource.com/641575 > Commit-Queue: Chris Blume <cblume@chromium.org> > Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> > Reviewed-by:
Leon Scroggins <scroggo@chromium.org> > Cr-Commit-Position: refs/heads/master@{#498580} TBR=scroggo@chromium.org,agl@chromium.org,cavalcantii@chromium.org,cblume@chromium.org,mtklein@chromium.org,adenilson.cavalcanti@arm.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 697280 Change-Id: I200e0e3b9cb9c884acfd6868067464a5f6cef804 Reviewed-on: https://chromium-review.googlesource.com/669259 Reviewed-by:
Mike Klein <mtklein@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#502474} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 7a620575b0512b33708e723c260fe66b90b5b103
-
Mike Klein authored
This reverts commit f4b484415281f09d0bbc0880f5d41dbdde96c209. Reason for revert: need to revert previous CL, which this depends on (because it added contrib/arm/inflate.c). Original change's description: > Zlib patch: prevent uninitialized use of state->check > > No need to call the Adler32 checksum function, just set the > struct field to the expected value. > > Upstream bug: madler/zlib#245 > > Bug: chromium:697481 > Change-Id: Ib972cc2507c8e7ca0b0b48464db33880ef960fb8 > Reviewed-on: https://chromium-review.googlesource.com/644505 > Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> > Reviewed-by:
Mike Klein <mtklein@chromium.org> > Cr-Commit-Position: refs/heads/master@{#498998} TBR=scroggo@chromium.org,agl@chromium.org,cavalcantii@chromium.org,npm@chromium.org,cblume@chromium.org,mtklein@chromium.org,adenilson.cavalcanti@arm.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: chromium:697481 Change-Id: I12c6ca6867d1d7e97c9f372f2d592ed75d51f093 Reviewed-on: https://chromium-review.googlesource.com/669480 Reviewed-by:
Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#502449} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 4e96bed9f68c0d6ae106c1042a3041eafcf59b9a
-
- Sep 15, 2017
-
-
Mike Klein authored
This reverts commit 94b37d283b45036a471e316ffcaf8fe71914a7ac. Reason for revert: need to revert earlier third_party/zlib CLs. Original change's description: > Run "git cl format" on third_party/zlib. > > TBR=thakis@chromium.org > Bug:762564 > > Change-Id: I63a809b785a21190b0b8a1744cf073a02beaa239 > Reviewed-on: https://chromium-review.googlesource.com/644512 > Commit-Queue: Noel Gordon <noel@chromium.org> > Reviewed-by:
Stuart Langley <slangley@chromium.org> > Reviewed-by:
Noel Gordon <noel@chromium.org> > Cr-Commit-Position: refs/heads/master@{#500206} TBR=noel@chromium.org,cavalcantii@chromium.org,cblume@chromium.org,slangley@chromium.org,nigeltao@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 762564 Change-Id: Ie01454d9b4f24da84a6ae9120ff9d73cf20f32b7 Reviewed-on: https://chromium-review.googlesource.com/669539 Reviewed-by:
Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#502402} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: dcf65ae672b4b2e3235310f7ef7415294e75e472
-
- Sep 07, 2017
-
-
Nigel Tao authored
TBR=thakis@chromium.org Bug:762564 Change-Id: I63a809b785a21190b0b8a1744cf073a02beaa239 Reviewed-on: https://chromium-review.googlesource.com/644512 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:
Stuart Langley <slangley@chromium.org> Reviewed-by:
Noel Gordon <noel@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#500206} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 94b37d283b45036a471e316ffcaf8fe71914a7ac
-
- Sep 05, 2017
-
-
Chris Blume authored
Echoing Adenilson's words: "I was reading the documentation related to ownership of folders in Chromium (https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md) and found the section related to 'Expectation of owners'. I checked the requirements and feel I may have the right profile: a) Be already acting as an owner: I started working with zlib in past January (when Chromium was still using zlib 1.2.8), pointed to Matt Sarrett the Mozilla paper (https://wiki.mozilla.org/images/0/09/Zlib-report.pdf) suggesting to upgrade from zlib 1.2.8 to 1.2.11. Next, I contacted the PDFium team and helped them to migrate to zlib 1.2.11 and verify the feasibility of using Chromium's zlib (please see attached message). This removed YAZC (Yet Another Zlib Copy) from the code base. b) Be a Chromium project member with full commit access of at least 6 months: I started contributing to WebKit way back in 2011 (where I'm a committer) and became a Blink committer a few months after the fork in 2013. c) Have submitted a substantial number of non-trivial changes: ongoing work on ARM optimizations (inffast, Adler-32, CRC32). d) Have committed or reviewed work in the last 90 days: landed the first ARM specific optimization and helping to review/test the inffast64 patch. e) Have bandwidth to contribute to reviews in a timely manner: I'm used to check my email in the weekends and I'm always willing to go the extra mile. I understand this is a long term committment, independent of my position at ARM (i.e. I'm an ARM employee). But as an example, last year I led the work to solve a tough platform predictability bug (https://bugs.chromium.org/p/chromium/issues/detail?id=559258) that required coordination with Mozilla (verification on FF) + Microsoft (i.e. reverting the quirky behavior in MS Edge) + Google (i.e. required fixes in mobile gmail and mobile gcalendar plus landing the fix in Chromium). The bulk of the work was done in my spare time while I was working for a startup that had nothing to do with Browsers or opensource. I shared this story because I hope it helps to demonstrate my sense of committment to the Chromium project (and the web as whole)." Change-Id: Ie79fe8f31f58b181e27084c5bc5bde6e444fd8d3 Reviewed-on: https://chromium-review.googlesource.com/650487 Reviewed-by:
Mike Klein <mtklein@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#499738} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: fd3c2dfe28485d69364bf6bcd0e42f0c8a749cff
-
- Aug 31, 2017
-
-
Adenilson Cavalcanti authored
No need to call the Adler32 checksum function, just set the struct field to the expected value. Upstream bug: madler/zlib#245 Bug: chromium:697481 Change-Id: Ib972cc2507c8e7ca0b0b48464db33880ef960fb8 Reviewed-on: https://chromium-review.googlesource.com/644505 Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Mike Klein <mtklein@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#498998} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: f4b484415281f09d0bbc0880f5d41dbdde96c209
-
- Aug 30, 2017
-
-
Chris Blume authored
This reverts commit e1f30a329eccf19ce1c8772e873abf88970cb65c. Reason for revert: This patch was originally reverted because we have an ARMv6 build target (part of Cronet) which incorrectly set NEON support in our build files. As a result, the NEON intrinsics were included despite ARMv6 not supporting NEON. The build problem was addressed here: https://chromium-review.googlesource.com/c/chromium/src/+/639931 Now that ARMv6 builds do not set NEON support, these zlib changes (which are only applied if NEON support is set in the build) will not cause errors on ARMv6 targets. BUG=697280 Original change's description: > zlib: inflate using wider loads and stores > > In inflate_fast() the output pointer always has plenty of room to write. > This means that so long as the target is capable, wide un-aligned > loads and stores can be used to transfer several bytes at once. > > When the reference distance is too short simply unroll the data a > little to increase the distance. Patch by Simon Hosie. > > PNG decoding performance gains should be around 30-33%. > > BUG=697280 > > Change-Id: I59854eb25d2b1e43561c8a2afaf9175bf10cf674 > Reviewed-on: https://chromium-review.googlesource.com/627098 > Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> > Reviewed-by:
Mike Klein <mtklein@chromium.org> > Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> > Cr-Commit-Position: refs/heads/master@{#497866} > Change-Id: I0b4cd1a393464c960c6a1e48a022a20340781e75 Reviewed-on: https://chromium-review.googlesource.com/641575 Commit-Queue: Chris Blume <cblume@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Leon Scroggins <scroggo@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#498580} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 0397489124ce7e6aced020f8b85f5034c7d5f49b
-
- Aug 28, 2017
-
-
Paul Miller authored
This reverts commit ad8fca9f4ad29ab87e49ec91a3577ef3696b3a84. Reason for revert: broke Android_Cronet_ARMv6_Builder: error: "NEON support not enabled" Original change's description: > zlib: inflate using wider loads and stores > > In inflate_fast() the output pointer always has plenty of room to write. > This means that so long as the target is capable, wide un-aligned > loads and stores can be used to transfer several bytes at once. > > When the reference distance is too short simply unroll the data a > little to increase the distance. Patch by Simon Hosie. > > PNG decoding performance gains should be around 30-33%. > > BUG=697280 > > Change-Id: I59854eb25d2b1e43561c8a2afaf9175bf10cf674 > Reviewed-on: https://chromium-review.googlesource.com/627098 > Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> > Reviewed-by:
Mike Klein <mtklein@chromium.org> > Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> > Cr-Commit-Position: refs/heads/master@{#497866} TBR=scroggo@chromium.org,agl@chromium.org,cavalcantii@chromium.org,cblume@chromium.org,mtklein@chromium.org,adenilson.cavalcanti@arm.com Change-Id: I93030617e4ed4feb665de1095c411bce80c531a9 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 697280 Reviewed-on: https://chromium-review.googlesource.com/639399 Reviewed-by:
Paul Miller <paulmiller@chromium.org> Commit-Queue: Paul Miller <paulmiller@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#497938} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: e1f30a329eccf19ce1c8772e873abf88970cb65c
-
Adenilson Cavalcanti authored
In inflate_fast() the output pointer always has plenty of room to write. This means that so long as the target is capable, wide un-aligned loads and stores can be used to transfer several bytes at once. When the reference distance is too short simply unroll the data a little to increase the distance. Patch by Simon Hosie. PNG decoding performance gains should be around 30-33%. BUG=697280 Change-Id: I59854eb25d2b1e43561c8a2afaf9175bf10cf674 Reviewed-on: https://chromium-review.googlesource.com/627098 Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Mike Klein <mtklein@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#497866} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: ad8fca9f4ad29ab87e49ec91a3577ef3696b3a84
-
Leon Scroggins III authored
Matt no longer works on Chromium Change-Id: I53e0283c731d1c3c27cf220de0ea113ea674cd60 Reviewed-on: https://chromium-review.googlesource.com/633485 Reviewed-by:
Lei Zhang <thestig@chromium.org> Commit-Queue: Leon Scroggins <scroggo@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#497755} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 7f3d0725a8fadf2b11886f87d0da45dce63f1226
-
- Aug 08, 2017
-
-
Nicolas Pena authored
This CL fixes a security bug in zlib. It was reported upstream long ago and the testcase was shared upstream but it's yet unsolved. As a fix, state->check is set to the same value as the adler32 of an empty string. Upstream bug: https://github.com/madler/zlib/issues/245 Bug: chromium:697481 Change-Id: I916c33edd37a9d2957426d8428bd20d05294dafe Reviewed-on: https://chromium-review.googlesource.com/601193 Reviewed-by:
Tom Sepez <tsepez@chromium.org> Reviewed-by:
Adam Langley <agl@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#492687} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 23af53e80e562441db3d061816468eeda17025a6
-
- Aug 04, 2017
-
-
mortonm authored
This CL fixes two aspects of broken ZIP processing on Mac. First, it ensures that .app files are treated as directories and as such do not break binary feature extraction, causing analysis to fail. Second, it performs type-sniffing to identify the existence of executable MachO files that do not have any file extension, as is the usual case on Mac. BUG=600392 Review-Url: https://codereview.chromium.org/2961373002 Cr-Original-Commit-Position: refs/heads/master@{#492032} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 034ecb569929e1202f39cf744a32e8deeade06c8
-