1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 6 This code is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License version 2 only, as 8 published by the Free Software Foundation. 9 10 This code is distributed in the hope that it will be useful, but WITHOUT 11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 version 2 for more details (a copy is included in the LICENSE file that 14 accompanied this code). 15 16 You should have received a copy of the GNU General Public License version 17 2 along with this work; if not, write to the Free Software Foundation, 18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 or visit www.oracle.com if you need additional information or have any 22 questions. 23 24 --> 25 26 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 27 <xsl:import href="xsl_util.xsl"/> 28 <xsl:output method="text" indent="no" omit-xml-declaration="yes"/> 29 30 <xsl:template match="/"> 31 <xsl:call-template name="file-header"/> 32 33 #ifndef TRACEFILES_JFR_NATIVE_EVENTSETTING_HPP 34 #define TRACEFILES_JFR_NATIVE_EVENTSETTING_HPP 35 36 #include "utilities/macros.hpp" 37 #if INCLUDE_TRACE 38 #include "tracefiles/traceEventIds.hpp" 39 40 /** 41 * Event setting. We add some padding so we can use our 42 * event IDs as indexes into this. 43 */ 44 45 struct jfrNativeEventSetting { 46 jlong threshold_ticks; 47 jlong cutoff_ticks; 48 u1 stacktrace; 49 u1 enabled; 50 u1 pad[6]; // Because GCC on linux ia32 at least tries to pack this. 51 }; 52 53 union JfrNativeSettings { 54 // Array version. 55 jfrNativeEventSetting bits[MaxTraceEventId]; 56 // Then, to make it easy to debug, 57 // add named struct members also. 58 struct { 59 jfrNativeEventSetting pad[NUM_RESERVED_EVENTS]; 60 <xsl:for-each select="trace/events/*"> 61 <xsl:text> </xsl:text> 62 <xsl:value-of select="concat('jfrNativeEventSetting ', @id, ';')"/> 63 <xsl:if test="position() != last()"> 64 <xsl:text> 65 </xsl:text> 66 </xsl:if> 67 </xsl:for-each> 68 } ev; 69 }; 70 71 #endif // INCLUDE_TRACE 72 #endif // TRACEFILES_JFR_NATIVE_EVENTSETTING_HPP 73 </xsl:template> 74 75 </xsl:stylesheet>