Skip to content

Commit a9a4e06

Browse files
committed
addressed comments.
1 parent ebe3b9f commit a9a4e06

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

src/runtime/crash_cgo_test.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,7 @@ func TestCgoTracebackGoroutineProfile(t *testing.T) {
713713

714714
func TestCgoTraceParser(t *testing.T) {
715715
// Test issue 29707.
716-
switch runtime.GOOS {
717-
case "windows", "plan9":
718-
t.Skipf("skipping cgo trace parser test on %s", runtime.GOOS)
719-
}
716+
testenv.MustHaveCGO(t)
720717
output := runTestProg(t, "testprogcgo", "CgoTraceParser")
721718
want := "OK\n"
722719
if output != want {
@@ -726,10 +723,7 @@ func TestCgoTraceParser(t *testing.T) {
726723

727724
func TestCgoTraceParserWithOneProc(t *testing.T) {
728725
// Test issue 29707.
729-
switch runtime.GOOS {
730-
case "windows", "plan9":
731-
t.Skipf("skipping cgo trace parser test on %s", runtime.GOOS)
732-
}
726+
testenv.MustHaveCGO(t)
733727
output := runTestProg(t, "testprogcgo", "CgoTraceParser", "GOMAXPROCS=1")
734728
want := "OK\n"
735729
if output != want {

src/runtime/proc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,7 @@ func oneNewExtraM() {
19271927
gp.racectx = racegostart(abi.FuncPCABIInternal(newextram) + sys.PCQuantum)
19281928
}
19291929
if trace.enabled {
1930-
// trigger two trace events for the locked g in the extra m,
1930+
// Trigger two trace events for the locked g in the extra m,
19311931
// since the next event of the g will be traceEvGoSysExit in exitsyscall,
19321932
// while calling from C thread to Go.
19331933
traceGoCreate(gp, 0) // no start pc

src/runtime/testdata/testprogcgo/issue29707.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !plan9 && !windows
6-
// +build !plan9,!windows
5+
//go:build unix
76

87
// This is for issue #29707
98

src/runtime/trace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func StartTrace() error {
272272
gp.traceseq++
273273
traceEvent(traceEvGoInSyscall, -1, gp.goid)
274274
} else if status == _Gdead && gp.m != nil && gp.m.isextra {
275-
// trigger two trace events for the dead g in the extra m,
275+
// Trigger two trace events for the dead g in the extra m,
276276
// since the next event of the g will be traceEvGoSysExit in exitsyscall,
277277
// while calling from C thread to Go.
278278
gp.traceseq = 0

0 commit comments

Comments
 (0)