src/hotspot/share/jfr/utilities/jfrTypes.hpp
changeset 58132 caa25ab47aca
parent 54603 cb8e16d6ff1e
child 58157 9dca61a7df19
child 58863 c16ac7a2eba4
--- a/src/hotspot/share/jfr/utilities/jfrTypes.hpp	Fri Sep 13 16:03:31 2019 -0700
+++ b/src/hotspot/share/jfr/utilities/jfrTypes.hpp	Sat Sep 14 14:40:09 2019 +0200
@@ -26,8 +26,6 @@
 #define SHARE_JFR_UTILITIES_JFRTYPES_HPP
 
 #include "jfrfiles/jfrEventIds.hpp"
-#include "memory/allocation.hpp"
-#include "utilities/globalDefinitions.hpp"
 
 typedef u8 traceid;
 typedef int fio_fd;
@@ -37,6 +35,14 @@
 const u4 MIN_STACK_DEPTH = 1;
 const u4 MAX_STACK_DEPTH = 2048;
 
+inline int compare_traceid(const traceid& lhs, const traceid& rhs) {
+  return lhs > rhs ? 1 : (lhs < rhs) ? -1 : 0;
+}
+
+inline int sort_traceid(traceid* lhs, traceid* rhs) {
+  return compare_traceid(*lhs, *rhs);
+}
+
 enum EventStartTime {
   UNTIMED,
   TIMED