src/hotspot/share/jfr/utilities/jfrTypes.hpp
changeset 58132 caa25ab47aca
parent 54603 cb8e16d6ff1e
child 58157 9dca61a7df19
child 58863 c16ac7a2eba4
equal deleted inserted replaced
58131:3054503bad7d 58132:caa25ab47aca
    24 
    24 
    25 #ifndef SHARE_JFR_UTILITIES_JFRTYPES_HPP
    25 #ifndef SHARE_JFR_UTILITIES_JFRTYPES_HPP
    26 #define SHARE_JFR_UTILITIES_JFRTYPES_HPP
    26 #define SHARE_JFR_UTILITIES_JFRTYPES_HPP
    27 
    27 
    28 #include "jfrfiles/jfrEventIds.hpp"
    28 #include "jfrfiles/jfrEventIds.hpp"
    29 #include "memory/allocation.hpp"
       
    30 #include "utilities/globalDefinitions.hpp"
       
    31 
    29 
    32 typedef u8 traceid;
    30 typedef u8 traceid;
    33 typedef int fio_fd;
    31 typedef int fio_fd;
    34 const int invalid_fd = -1;
    32 const int invalid_fd = -1;
    35 const jlong invalid_offset = -1;
    33 const jlong invalid_offset = -1;
    36 const u4 STACK_DEPTH_DEFAULT = 64;
    34 const u4 STACK_DEPTH_DEFAULT = 64;
    37 const u4 MIN_STACK_DEPTH = 1;
    35 const u4 MIN_STACK_DEPTH = 1;
    38 const u4 MAX_STACK_DEPTH = 2048;
    36 const u4 MAX_STACK_DEPTH = 2048;
    39 
    37 
       
    38 inline int compare_traceid(const traceid& lhs, const traceid& rhs) {
       
    39   return lhs > rhs ? 1 : (lhs < rhs) ? -1 : 0;
       
    40 }
       
    41 
       
    42 inline int sort_traceid(traceid* lhs, traceid* rhs) {
       
    43   return compare_traceid(*lhs, *rhs);
       
    44 }
       
    45 
    40 enum EventStartTime {
    46 enum EventStartTime {
    41   UNTIMED,
    47   UNTIMED,
    42   TIMED
    48   TIMED
    43 };
    49 };
    44 
    50