src/hotspot/share/code/oopRecorder.cpp
changeset 48831 05894c073b7e
parent 47216 71c04702a3d5
child 49192 6734eeef4283
--- a/src/hotspot/share/code/oopRecorder.cpp	Wed Jan 31 17:43:46 2018 -0800
+++ b/src/hotspot/share/code/oopRecorder.cpp	Thu Feb 01 13:30:53 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -172,9 +172,8 @@
 }
 
 int ObjectLookup::sort_by_address(oop a, oop b) {
-  if (b > a) return 1;
-  if (a > b) return -1;
-  return 0;
+  // oopDesc::compare returns the opposite of what this function returned
+  return -(oopDesc::compare(a, b));
 }
 
 int ObjectLookup::sort_by_address(ObjectEntry* a, ObjectEntry* b) {