cmd/coordinator: populate commit label on benchmarks

This was lost in one of the many refactorings of CL 38306.

Updates golang/go#19871

Change-Id: I4514d4350feb1420861eae9a9dd021fee5b5ba6f
Reviewed-on: https://go-review.googlesource.com/43052
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/coordinator/coordinator.go b/cmd/coordinator/coordinator.go
index 05268ed..e647453 100644
--- a/cmd/coordinator/coordinator.go
+++ b/cmd/coordinator/coordinator.go
@@ -2780,6 +2780,7 @@
 	if !st.shouldBench() {
 		return nil
 	}
+	// We know rev and rev.Commit.Parents[0] exist because benchmarkItem.buildParent has checked.
 	rev := st.trySet.ci.Revisions[st.trySet.ci.CurrentRevision]
 	ps := rev.PatchSetNumber
 	benchFiles := []*benchFile{
@@ -2794,6 +2795,8 @@
 		benchFiles[0].out.WriteString("staging: true\n")
 	}
 	benchFiles[1].out.Write(benchFiles[0].out.Bytes())
+	fmt.Fprintf(&benchFiles[0].out, "commit: %s\n", rev.Commit.Parents[0].CommitID)
+	fmt.Fprintf(&benchFiles[1].out, "commit: %s\n", st.builderRev.rev)
 	return benchFiles
 }