Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-impl-ref2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mu
mu-impl-ref2
Commits
533893e2
Commit
533893e2
authored
May 04, 2016
by
Kunshan Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GC: HexDump when header is 0
parent
ef89c4e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/main/scala/uvm/refimpl/mem/simpleimmix/SimpleImmixCollector.scala
...la/uvm/refimpl/mem/simpleimmix/SimpleImmixCollector.scala
+13
-0
No files found.
src/main/scala/uvm/refimpl/mem/simpleimmix/SimpleImmixCollector.scala
View file @
533893e2
...
...
@@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory
import
com.typesafe.scalalogging.Logger
import
scala.collection.mutable.ArrayBuffer
import
uvm.refimpl.UvmRefImplException
import
uvm.utils.HexDump
object
SimpleImmixCollector
{
val
logger
=
Logger
(
LoggerFactory
.
getLogger
(
getClass
.
getName
))
...
...
@@ -238,6 +239,18 @@ class SimpleImmixCollector(val heap: SimpleImmixHeap, val space: SimpleImmixSpac
private
def
maybeMove
(
toObj
:
Word
,
updateFunc
:
Word
=>
Unit
)
:
Option
[
Word
]
=
{
val
oldHeader
=
HeaderUtils
.
getTag
(
toObj
)
logger
.
debug
(
"GC header of 0x%x is 0x%x"
.
format
(
toObj
,
oldHeader
))
if
(
oldHeader
==
0x0
L
)
{
logger
.
error
(
"Header is zero! GC header of 0x%x is 0x%x"
.
format
(
toObj
,
oldHeader
))
val
plusMinus
=
256L
val
memDump
=
HexDump
.
dumpMemory
(
toObj
-
plusMinus
,
plusMinus
*
2L
)
logger
.
error
(
"Memory dump:\n"
+
memDump
)
throw
new
UvmRefImplException
(
"Header is zero! obj: 0x%x, header: 0x%x"
.
format
(
toObj
,
oldHeader
))
}
val
markBit
=
oldHeader
&
MARK_MASK
val
moveBit
=
oldHeader
&
MOVE_MASK
val
wasMarked
=
markBit
!=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment