]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: rename inlinedCall.func_ to inlinedCall.nameOff
authorMichael Pratt <mpratt@google.com>
Fri, 2 Sep 2022 20:59:07 +0000 (16:59 -0400)
committerMichael Pratt <mpratt@google.com>
Wed, 7 Sep 2022 14:47:36 +0000 (14:47 +0000)
The meaning of this field is unchanged, this CL simply gives it a more
descriptive name, as func_ makes it sound like a reference to the _func.

Change-Id: I70e54f34bede7636ce4d7b9dd0f7557308f02143
Reviewed-on: https://go-review.googlesource.com/c/go/+/427961
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/runtime/preempt.go
src/runtime/race.go
src/runtime/symtab.go
src/runtime/traceback.go

index dae417215fd66ea47fbe90def1ef91710b250e42..815df86269d9198a9419702395095f5fa5455b8c 100644 (file)
@@ -418,7 +418,7 @@ func isAsyncSafePoint(gp *g, pc, sp, lr uintptr) (bool, uintptr) {
                inltree := (*[1 << 20]inlinedCall)(inldata)
                ix := pcdatavalue(f, _PCDATA_InlTreeIndex, pc, nil)
                if ix >= 0 {
-                       name = funcnameFromNameoff(f, inltree[ix].func_)
+                       name = funcnameFromNameoff(f, inltree[ix].nameOff)
                }
        }
        if hasPrefix(name, "runtime.") ||
index a67c8b9cdfabc20e714261aa1b2daecb966626de..15048f40218e0e04fa90fbdec4d43dd8ea39c3cd 100644 (file)
@@ -187,7 +187,7 @@ func raceSymbolizeCode(ctx *symbolizeCodeContext) {
                                                        continue
                                                }
                                                ctx.pc = f.Entry() + uintptr(inltree[ix].parentPc) // "caller" pc
-                                               ctx.fn = cfuncnameFromNameoff(fi, inltree[ix].func_)
+                                               ctx.fn = cfuncnameFromNameoff(fi, inltree[ix].nameOff)
                                                ctx.line = uintptr(line)
                                                ctx.file = &bytes(file)[0] // assume NUL-terminated
                                                ctx.off = pc - f.Entry()
index a1a7eba83ceb79e5d5bccccb0064818267c770de..78c49b0dbc451d556aee157704d6203dc4d0bd70 100644 (file)
@@ -116,7 +116,7 @@ func (ci *Frames) Next() (frame Frame, more bool) {
                        if ix >= 0 {
                                // Note: entry is not modified. It always refers to a real frame, not an inlined one.
                                f = nil
-                               name = funcnameFromNameoff(funcInfo, inltree[ix].func_)
+                               name = funcnameFromNameoff(funcInfo, inltree[ix].nameOff)
                                // File/line from funcline1 below are already correct.
                        }
                }
@@ -726,7 +726,7 @@ func FuncForPC(pc uintptr) *Func {
                // The runtime currently doesn't have function end info, alas.
                if ix := pcdatavalue1(f, _PCDATA_InlTreeIndex, pc, nil, false); ix >= 0 {
                        inltree := (*[1 << 20]inlinedCall)(inldata)
-                       name := funcnameFromNameoff(f, inltree[ix].func_)
+                       name := funcnameFromNameoff(f, inltree[ix].nameOff)
                        file, line := funcline(f, pc)
                        fi := &funcinl{
                                ones:  ^uint32(0),
@@ -1174,6 +1174,6 @@ func stackmapdata(stkmap *stackmap, n int32) bitvector {
 type inlinedCall struct {
        funcID   funcID // type of the called function
        _        [3]byte
-       func_    int32 // offset into pclntab for name of called function
+       nameOff  int32 // offset into pclntab for name of called function
        parentPc int32 // position of an instruction whose source position is the call site (offset from entry)
 }
index 286e9c610ec932d9f390a63ac40f5d92df371086..96acec0ddd615133079000af6c70f5c69e3549f7 100644 (file)
@@ -405,7 +405,7 @@ func gentraceback(pc0, sp0, lr0 uintptr, gp *g, skip int, pcbuf *uintptr, max in
 
                                        // Create a fake _func for the
                                        // inlined function.
-                                       inlFunc.nameoff = inltree[ix].func_
+                                       inlFunc.nameoff = inltree[ix].nameOff
                                        inlFunc.funcID = inltree[ix].funcID
 
                                        if (flags&_TraceRuntimeFrames) != 0 || showframe(inlFuncInfo, gp, nprint == 0, inlFuncInfo.funcID, lastFuncID) {
@@ -808,7 +808,7 @@ func printAncestorTracebackFuncInfo(f funcInfo, pc uintptr) {
                inltree := (*[1 << 20]inlinedCall)(inldata)
                ix := pcdatavalue(f, _PCDATA_InlTreeIndex, pc, nil)
                if ix >= 0 {
-                       name = funcnameFromNameoff(f, inltree[ix].func_)
+                       name = funcnameFromNameoff(f, inltree[ix].nameOff)
                }
        }
        file, line := funcline(f, pc)