src/share/vm/gc_implementation/shared/markSweep.inline.hpp

changeset 6413
595c0f60d50d
parent 6198
55fb97c4c58d
child 6876
710a3c8b516e
     1.1 --- a/src/share/vm/gc_implementation/shared/markSweep.inline.hpp	Mon Mar 24 09:14:14 2014 -0700
     1.2 +++ b/src/share/vm/gc_implementation/shared/markSweep.inline.hpp	Tue Mar 18 19:07:22 2014 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -30,10 +30,18 @@
    1.11  #include "utilities/stack.inline.hpp"
    1.12  #include "utilities/macros.hpp"
    1.13  #if INCLUDE_ALL_GCS
    1.14 +#include "gc_implementation/g1/g1StringDedup.hpp"
    1.15  #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
    1.16  #endif // INCLUDE_ALL_GCS
    1.17  
    1.18  inline void MarkSweep::mark_object(oop obj) {
    1.19 +#if INCLUDE_ALL_GCS
    1.20 +  if (G1StringDedup::is_enabled()) {
    1.21 +    // We must enqueue the object before it is marked
    1.22 +    // as we otherwise can't read the object's age.
    1.23 +    G1StringDedup::enqueue_from_mark(obj);
    1.24 +  }
    1.25 +#endif
    1.26    // some marks may contain information we need to preserve so we store them away
    1.27    // and overwrite the mark.  We'll restore it at the end of markSweep.
    1.28    markOop mark = obj->mark();

mercurial