aboutsummaryrefslogtreecommitdiff
path: root/src/internal/coverage/encodemeta
AgeCommit message (Collapse)Author
18 hoursinternal/coverage: first write error never recordedWeixie Cui
Change-Id: Ie51246263ede8e069cd72a9646e0d485ec3d3806 GitHub-Last-Rev: 5a610d393a01e710db8db4639837b75816e06e04 GitHub-Pull-Request: golang/go#78610 Reviewed-on: https://go-review.googlesource.com/c/go/+/764483 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
2024-10-07internal/coverage: use 128-bit FNV-1a hash instead of MD5qmuntal
This change replaces the MD5 hash used to identify coverage files with a 128-bit FNV-1a hash. This change is motivated by the fact that MD5 should only be used for legacy cryptographic purposes. The 128-bit FNV-1a hash is sufficient for the purpose of identifying coverage files, it having the same theoretical collision resistance as MD5, but with the added benefit of being faster to compute. Change-Id: I7b547ce2ea784f8f4071599a10fcb512b87ee469 Reviewed-on: https://go-review.googlesource.com/c/go/+/617360 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-02-29internal/coverage/encodemeta: simplify appending zero valuesapocelipes
Appending zero values directly. Change-Id: Icfb6e135b6aa16662dd67bdbf64ea0f63c612b2f GitHub-Last-Rev: 57547b94087f216e943362e507b2339dd385f568 GitHub-Pull-Request: golang/go#65291 Reviewed-on: https://go-review.googlesource.com/c/go/+/558576 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2022-10-11internal/coverage: minor code cleanupsThan McIntosh
Delete some unused code, various cleanups to fix staticcheck warnings. Change-Id: Ie475d57735a83351a4977f0dd4bc1387ce06a20e Reviewed-on: https://go-review.googlesource.com/c/go/+/441935 Reviewed-by: David Chase <drchase@google.com>
2022-09-29internal: use io.SeekStart, io.SeekCurrent, and io.SeekEndcuiweixie
Change-Id: I23ab738b73bc33d3b0b10013c3fadd95b5b24681 Reviewed-on: https://go-review.googlesource.com/c/go/+/436719 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-09-28internal: use bytes.Clonecuiweixie
Change-Id: Ia96ddd520a7bd2fd53bff55315c6fac04ae96a2f Reviewed-on: https://go-review.googlesource.com/c/go/+/435282 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
2022-09-26internal/coverage: add coverage meta-data encoderThan McIntosh
Add a new package with APIs for encoding coverage meta-data. This provides support for accumulating information about each function during the compilation process, and then encoding and emitting a payload for a coverage meta-data symbol. Not yet connected to the rest of the coverage machinery (that will appear in a later patch). Updates #51430. Change-Id: I61054ce87f205b25fb1bfedaa740fd7425c34de4 Reviewed-on: https://go-review.googlesource.com/c/go/+/353453 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>