# HG changeset patch # User zgu # Date 1537390282 14400 # Node ID 61f62fb4d4bfb9f414e507faf6cfbf6415c37a66 # Parent 3f32076a43a678362e95e61a5ac1c24ab20b5644 8210879: ClassLoaderStatsClosure does raw oop comparison Summary: Uses oopDesc::equals() for comparing oop equality Reviewed-by: shade diff -r 3f32076a43a6 -r 61f62fb4d4bf src/hotspot/share/classfile/classLoaderStats.hpp --- a/src/hotspot/share/classfile/classLoaderStats.hpp Wed Sep 19 22:42:34 2018 +0200 +++ b/src/hotspot/share/classfile/classLoaderStats.hpp Wed Sep 19 16:51:22 2018 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2018, 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 @@ -28,6 +28,7 @@ #include "classfile/classLoaderData.hpp" #include "oops/klass.hpp" +#include "oops/oop.hpp" #include "oops/oopsHierarchy.hpp" #include "runtime/vm_operations.hpp" #include "services/diagnosticCommand.hpp" @@ -97,7 +98,7 @@ class ClassLoaderStatsClosure : public CLDClosure { protected: static bool oop_equals(oop const& s1, oop const& s2) { - return s1 == s2; + return oopDesc::equals(s1, s2); } static unsigned oop_hash(oop const& s1) {