[go] cmd: add a new goexperiment for redesigned code coverage

92 views
Skip to first unread message

Than McIntosh (Gerrit)

unread,
Mar 25, 2022, 1:39:36 PM3/25/22
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Than McIntosh has uploaded this change for review.

View Change

cmd: add a new goexperiment for redesigned code coverage

Add a new "coverageredesign" GOEXPERIMENT (currently off by default),
for gating the use of the new code coverage design/implementation.

Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
---
A src/internal/goexperiment/exp_coverageredesign_off.go
A src/internal/goexperiment/exp_coverageredesign_on.go
M src/internal/goexperiment/flags.go
3 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/src/internal/goexperiment/exp_coverageredesign_off.go b/src/internal/goexperiment/exp_coverageredesign_off.go
new file mode 100644
index 0000000..95d3a6c
--- /dev/null
+++ b/src/internal/goexperiment/exp_coverageredesign_off.go
@@ -0,0 +1,9 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build !goexperiment.coverageredesign
+// +build !goexperiment.coverageredesign
+
+package goexperiment
+
+const CoverageRedesign = false
+const CoverageRedesignInt = 0
diff --git a/src/internal/goexperiment/exp_coverageredesign_on.go b/src/internal/goexperiment/exp_coverageredesign_on.go
new file mode 100644
index 0000000..330a234
--- /dev/null
+++ b/src/internal/goexperiment/exp_coverageredesign_on.go
@@ -0,0 +1,9 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build goexperiment.coverageredesign
+// +build goexperiment.coverageredesign
+
+package goexperiment
+
+const CoverageRedesign = true
+const CoverageRedesignInt = 1
diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go
index 9150493..7c62007 100644
--- a/src/internal/goexperiment/flags.go
+++ b/src/internal/goexperiment/flags.go
@@ -91,4 +91,8 @@
// has been broken out to its own experiment that is disabled
// by default.
HeapMinimum512KiB bool
+
+ // CoverageRedesign enables the new compiler-based code coverage
+ // tooling.
+ CoverageRedesign bool
}

To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
Gerrit-Change-Number: 395894
Gerrit-PatchSet: 1
Gerrit-Owner: Than McIntosh <th...@google.com>
Gerrit-MessageType: newchange

Than McIntosh (Gerrit)

unread,
Apr 20, 2022, 7:04:56 AM4/20/22
to goph...@pubsubhelper.golang.org, Austin Clements, Michael Knyszek, Gopher Robot, golang-co...@googlegroups.com

Attention is currently required from: Michael Knyszek, Austin Clements.

Patch set 3:Run-TryBot +1

View Change

    To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
    Gerrit-Change-Number: 395894
    Gerrit-PatchSet: 3
    Gerrit-Owner: Than McIntosh <th...@google.com>
    Gerrit-Reviewer: Austin Clements <aus...@google.com>
    Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
    Gerrit-Reviewer: Than McIntosh <th...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Michael Knyszek <mkny...@google.com>
    Gerrit-Attention: Austin Clements <aus...@google.com>
    Gerrit-Comment-Date: Wed, 20 Apr 2022 11:04:51 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Than McIntosh (Gerrit)

    unread,
    Apr 20, 2022, 2:00:18 PM4/20/22
    to goph...@pubsubhelper.golang.org, Gopher Robot, Austin Clements, Michael Knyszek, golang-co...@googlegroups.com

    Attention is currently required from: Michael Knyszek, Austin Clements.

    Patch set 4:Run-TryBot +1

    View Change

      To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
      Gerrit-Change-Number: 395894
      Gerrit-PatchSet: 4
      Gerrit-Owner: Than McIntosh <th...@google.com>
      Gerrit-Reviewer: Austin Clements <aus...@google.com>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
      Gerrit-Reviewer: Than McIntosh <th...@google.com>
      Gerrit-Attention: Michael Knyszek <mkny...@google.com>
      Gerrit-Attention: Austin Clements <aus...@google.com>
      Gerrit-Comment-Date: Wed, 20 Apr 2022 18:00:14 +0000

      Than McIntosh (Gerrit)

      unread,
      Apr 27, 2022, 10:52:07 AM4/27/22
      to goph...@pubsubhelper.golang.org, Gopher Robot, Austin Clements, Michael Knyszek, golang-co...@googlegroups.com

      Attention is currently required from: Michael Knyszek, Austin Clements.

      Patch set 5:Run-TryBot +1

      View Change

        To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
        Gerrit-Change-Number: 395894
        Gerrit-PatchSet: 5
        Gerrit-Owner: Than McIntosh <th...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-Reviewer: Than McIntosh <th...@google.com>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Attention: Austin Clements <aus...@google.com>
        Gerrit-Comment-Date: Wed, 27 Apr 2022 14:52:01 +0000

        David Chase (Gerrit)

        unread,
        Apr 28, 2022, 10:43:40 AM4/28/22
        to Than McIntosh, goph...@pubsubhelper.golang.org, Gopher Robot, Austin Clements, Michael Knyszek, golang-co...@googlegroups.com

        Attention is currently required from: Austin Clements, Michael Knyszek, Than McIntosh.

        Patch set 5:Code-Review +2

        View Change

        2 comments:

        • Patchset:

          • Patch Set #5:

            Figure I should approve the easy ones, get them out of the way.

        • File src/internal/goexperiment/exp_coverageredesign_on.go:

          • Patch Set #5, Line 9: CoverageRedesignInt

            I'm sure there's a perfectly good reason for this, just not sure what it is.

        To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
        Gerrit-Change-Number: 395894
        Gerrit-PatchSet: 5
        Gerrit-Owner: Than McIntosh <th...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-Reviewer: Than McIntosh <th...@google.com>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Attention: Austin Clements <aus...@google.com>
        Gerrit-Attention: Than McIntosh <th...@google.com>
        Gerrit-Comment-Date: Thu, 28 Apr 2022 14:43:36 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Gerrit-MessageType: comment

        Than McIntosh (Gerrit)

        unread,
        Apr 28, 2022, 10:48:41 AM4/28/22
        to goph...@pubsubhelper.golang.org, David Chase, Gopher Robot, Austin Clements, Michael Knyszek, golang-co...@googlegroups.com

        Attention is currently required from: Austin Clements, David Chase, Michael Knyszek.

        View Change

        1 comment:

        • File src/internal/goexperiment/exp_coverageredesign_on.go:

          • Patch Set #5, Line 9: CoverageRedesignInt

            I'm sure there's a perfectly good reason for this, just not sure what it is.

        To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
        Gerrit-Change-Number: 395894
        Gerrit-PatchSet: 5
        Gerrit-Owner: Than McIntosh <th...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-Reviewer: Than McIntosh <th...@google.com>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Attention: Austin Clements <aus...@google.com>
        Gerrit-Attention: David Chase <drc...@google.com>
        Gerrit-Comment-Date: Thu, 28 Apr 2022 14:48:37 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: David Chase <drc...@google.com>
        Gerrit-MessageType: comment

        Than McIntosh (Gerrit)

        unread,
        May 5, 2022, 1:21:07 PM5/5/22
        to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

        Attention is currently required from: Austin Clements, David Chase, Michael Knyszek, Than McIntosh.

        Than McIntosh uploaded patch set #9 to this change.

        View Change

        cmd: add a new goexperiment for redesigned code coverage

        Add a new "coverageredesign" GOEXPERIMENT (currently off by default),
        for gating the use of the new code coverage design/implementation.

        Updates #51430.


        Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
        ---
        A src/internal/goexperiment/exp_coverageredesign_off.go
        A src/internal/goexperiment/exp_coverageredesign_on.go
        M src/internal/goexperiment/flags.go
        3 files changed, 36 insertions(+), 0 deletions(-)

        To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
        Gerrit-Change-Number: 395894
        Gerrit-PatchSet: 9
        Gerrit-Owner: Than McIntosh <th...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-Reviewer: Than McIntosh <th...@google.com>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Attention: Austin Clements <aus...@google.com>
        Gerrit-Attention: Than McIntosh <th...@google.com>
        Gerrit-Attention: David Chase <drc...@google.com>
        Gerrit-MessageType: newpatchset

        Than McIntosh (Gerrit)

        unread,
        May 6, 2022, 10:13:44 AM5/6/22
        to goph...@pubsubhelper.golang.org, David Chase, Gopher Robot, Austin Clements, Michael Knyszek, golang-co...@googlegroups.com

        Attention is currently required from: Austin Clements, David Chase, Michael Knyszek.

        Patch set 10:Run-TryBot +1

        View Change

          To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
          Gerrit-Change-Number: 395894
          Gerrit-PatchSet: 10
          Gerrit-Owner: Than McIntosh <th...@google.com>
          Gerrit-Reviewer: Austin Clements <aus...@google.com>
          Gerrit-Reviewer: David Chase <drc...@google.com>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-Reviewer: Than McIntosh <th...@google.com>
          Gerrit-Attention: Michael Knyszek <mkny...@google.com>
          Gerrit-Attention: Austin Clements <aus...@google.com>
          Gerrit-Attention: David Chase <drc...@google.com>
          Gerrit-Comment-Date: Fri, 06 May 2022 14:13:39 +0000

          Austin Clements (Gerrit)

          unread,
          Jul 19, 2022, 12:26:00 PM7/19/22
          to Than McIntosh, goph...@pubsubhelper.golang.org, Austin Clements, Gopher Robot, David Chase, golang-co...@googlegroups.com

          Attention is currently required from: Than McIntosh.

          Patch set 14:Code-Review +2

          View Change

          2 comments:

          • Commit Message:

            • Patch Set #14, Line 9: coverageredesign

              It always takes me several re-scans to lex this as "coverage redesign" but since it's temporary I'm not going to ask you to change it. :)

          • File src/internal/goexperiment/exp_coverageredesign_on.go:

            • It's coming from here in the generator program: […]

              This is for when you need to construct another constant from this constant. E.g., those unfortunate something*(CoverageRedesignInt) + otherthing*(1-CoverRedesignInt) expressions. The only manipulation you can do to the bool constant in constant context is negate it. (This is one case where I wish we just had a ternary expression...)

          To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
          Gerrit-Change-Number: 395894
          Gerrit-PatchSet: 14
          Gerrit-Owner: Than McIntosh <th...@google.com>
          Gerrit-Reviewer: Austin Clements <aus...@google.com>
          Gerrit-Reviewer: David Chase <drc...@google.com>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-Reviewer: Than McIntosh <th...@google.com>
          Gerrit-Attention: Than McIntosh <th...@google.com>
          Gerrit-Comment-Date: Tue, 19 Jul 2022 16:25:56 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Than McIntosh <th...@google.com>

          Than McIntosh (Gerrit)

          unread,
          Sep 26, 2022, 4:27:52 PM9/26/22
          to goph...@pubsubhelper.golang.org, Austin Clements, Gopher Robot, David Chase, golang-co...@googlegroups.com

          Patch set 20:Run-TryBot +1

          View Change

            To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
            Gerrit-Change-Number: 395894
            Gerrit-PatchSet: 20
            Gerrit-Owner: Than McIntosh <th...@google.com>
            Gerrit-Reviewer: Austin Clements <aus...@google.com>
            Gerrit-Reviewer: David Chase <drc...@google.com>
            Gerrit-Reviewer: Gopher Robot <go...@golang.org>
            Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
            Gerrit-Reviewer: Than McIntosh <th...@google.com>
            Gerrit-Comment-Date: Mon, 26 Sep 2022 20:27:48 +0000

            Than McIntosh (Gerrit)

            unread,
            Sep 26, 2022, 4:50:24 PM9/26/22
            to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Gopher Robot, Austin Clements, David Chase, Michael Knyszek, golang-co...@googlegroups.com

            Than McIntosh submitted this change.

            View Change



            14 is the latest approved patch-set.
            No files were changed between the latest approved patch-set and the submitted one.

            Approvals: Gopher Robot: TryBots succeeded Austin Clements: Looks good to me, approved Than McIntosh: Run TryBots David Chase: Looks good to me, approved
            cmd: add a new goexperiment for redesigned code coverage

            Add a new "coverageredesign" GOEXPERIMENT (currently off by default),
            for gating the use of the new code coverage design/implementation.

            Updates #51430.

            Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
            Reviewed-on: https://go-review.googlesource.com/c/go/+/395894
            TryBot-Result: Gopher Robot <go...@golang.org>
            Reviewed-by: David Chase <drc...@google.com>
            Run-TryBot: Than McIntosh <th...@google.com>
            Reviewed-by: Austin Clements <aus...@google.com>

            ---
            A src/internal/goexperiment/exp_coverageredesign_off.go
            A src/internal/goexperiment/exp_coverageredesign_on.go
            M src/internal/goexperiment/flags.go
            3 files changed, 41 insertions(+), 0 deletions(-)

            index 20d9c2d..8faaf16 100644
            --- a/src/internal/goexperiment/flags.go
            +++ b/src/internal/goexperiment/flags.go
            @@ -86,4 +86,8 @@

            // has been broken out to its own experiment that is disabled
            // by default.
            HeapMinimum512KiB bool
            +
            + // CoverageRedesign enables the new compiler-based code coverage
            + // tooling.
            + CoverageRedesign bool
            }

            To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
            Gerrit-Change-Number: 395894
            Gerrit-PatchSet: 21
            Gerrit-Owner: Than McIntosh <th...@google.com>
            Gerrit-Reviewer: Austin Clements <aus...@google.com>
            Gerrit-Reviewer: David Chase <drc...@google.com>
            Gerrit-Reviewer: Gopher Robot <go...@golang.org>
            Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
            Gerrit-Reviewer: Than McIntosh <th...@google.com>
            Gerrit-MessageType: merged
            Reply all
            Reply to author
            Forward
            0 new messages