--- 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