Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/shared/markSweep.inline.hpp @ 17764:595c0f60d50d
8029075: String deduplication in G1
Summary: Implementation of JEP 192, http://openjdk.java.net/jeps/192
Reviewed-by: brutisso, tschatzl, coleenp
author | pliden |
---|---|
date | Tue, 18 Mar 2014 19:07:22 +0100 |
parents | 55fb97c4c58d |
children | 52b4284cb496 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/shared/markSweep.inline.hpp Mon Mar 24 09:14:14 2014 -0700 +++ b/src/share/vm/gc_implementation/shared/markSweep.inline.hpp Tue Mar 18 19:07:22 2014 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,10 +30,18 @@ #include "utilities/stack.inline.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS +#include "gc_implementation/g1/g1StringDedup.hpp" #include "gc_implementation/parallelScavenge/psParallelCompact.hpp" #endif // INCLUDE_ALL_GCS inline void MarkSweep::mark_object(oop obj) { +#if INCLUDE_ALL_GCS + if (G1StringDedup::is_enabled()) { + // We must enqueue the object before it is marked + // as we otherwise can't read the object's age. + G1StringDedup::enqueue_from_mark(obj); + } +#endif // some marks may contain information we need to preserve so we store them away // and overwrite the mark. We'll restore it at the end of markSweep. markOop mark = obj->mark();