aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runtime/heapdump.go3
-rw-r--r--src/runtime/mbitmap.go3
-rw-r--r--src/runtime/mgcmark.go7
-rw-r--r--src/runtime/stack.go3
4 files changed, 12 insertions, 4 deletions
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go
index b255cbbae3..2b8937834c 100644
--- a/src/runtime/heapdump.go
+++ b/src/runtime/heapdump.go
@@ -248,10 +248,11 @@ func dumpframe(s *stkframe, arg unsafe.Pointer) bool {
// Figure out what we can about our stack map
pc := s.pc
+ pcdata := int32(-1) // Use the entry map at function entry
if pc != f.entry {
pc--
+ pcdata = pcdatavalue(f, _PCDATA_StackMapIndex, pc, nil)
}
- pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, pc, nil)
if pcdata == -1 {
// We do not have a valid pcdata value but there might be a
// stackmap for this function. It is likely that we are looking
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go
index 38d994eb5a..69bd0b502b 100644
--- a/src/runtime/mbitmap.go
+++ b/src/runtime/mbitmap.go
@@ -2004,10 +2004,11 @@ func getgcmask(ep interface{}) (mask []byte) {
if targetpc == 0 {
return
}
+ pcdata := int32(-1) // Use the entry map at function entry
if targetpc != f.entry {
targetpc--
+ pcdata = pcdatavalue(f, _PCDATA_StackMapIndex, targetpc, nil)
}
- pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, targetpc, nil)
if pcdata == -1 {
return
}
diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go
index 270fa6cd32..7be2820909 100644
--- a/src/runtime/mgcmark.go
+++ b/src/runtime/mgcmark.go
@@ -801,10 +801,15 @@ func scanframeworker(frame *stkframe, cache *pcvalueCache, gcw *gcWork) {
if _DebugGC > 1 {
print("scanframe ", funcname(f), "\n")
}
+ pcdata := int32(-1)
if targetpc != f.entry {
+ // Back up to the CALL. If we're at the function entry
+ // point, we want to use the entry map (-1), even if
+ // the first instruction of the function changes the
+ // stack map.
targetpc--
+ pcdata = pcdatavalue(f, _PCDATA_StackMapIndex, targetpc, cache)
}
- pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, targetpc, cache)
if pcdata == -1 {
// We do not have a valid pcdata value but there might be a
// stackmap for this function. It is likely that we are looking
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index 63a286bf59..2d10ac8381 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -625,10 +625,11 @@ func adjustframe(frame *stkframe, arg unsafe.Pointer) bool {
// have full GC info for it (because it is written in asm).
return true
}
+ pcdata := int32(-1) // Use the entry map at function entry
if targetpc != f.entry {
targetpc--
+ pcdata = pcdatavalue(f, _PCDATA_StackMapIndex, targetpc, &adjinfo.cache)
}
- pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, targetpc, &adjinfo.cache)
if pcdata == -1 {
pcdata = 0 // in prologue
}