< prev index next >

test/jdk/jdk/jfr/event/metadata/TestEventMetadata.java

Print this page
rev 51054 : imported patch 9000013-aixDisableJFR-requires.patch


  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.event.metadata;
  27 
  28 import java.util.HashSet;
  29 import java.util.List;
  30 import java.util.Set;
  31 
  32 import jdk.jfr.EventType;
  33 import jdk.jfr.FlightRecorder;
  34 import jdk.jfr.ValueDescriptor;
  35 import jdk.test.lib.Asserts;
  36 import jdk.test.lib.jfr.EventNames;
  37 
  38 /*
  39  * @test
  40  * @key jfr

  41  * @library /test/lib
  42  * @run main/othervm jdk.jfr.event.metadata.TestEventMetadata
  43  */
  44 
  45 public class TestEventMetadata {
  46 
  47     /*
  48      * Short guide to writing event metadata
  49      * =====================================
  50 
  51      * Name
  52      * ----
  53      *
  54      * Symbolic name that is used to identify an event, or a field. Referred to
  55      * as "id" and "field" in trace.xml-files and @Name in the Java API. If it is
  56      * the name of an event, the name should be prefixed "jdk.", which
  57      * happens automatically for native events.
  58      *
  59      * The name should be short, but not so brief that collision is likely with
  60      * future events or fields. It should only consist of letters and numbers.




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.event.metadata;
  27 
  28 import java.util.HashSet;
  29 import java.util.List;
  30 import java.util.Set;
  31 
  32 import jdk.jfr.EventType;
  33 import jdk.jfr.FlightRecorder;
  34 import jdk.jfr.ValueDescriptor;
  35 import jdk.test.lib.Asserts;
  36 import jdk.test.lib.jfr.EventNames;
  37 
  38 /**
  39  * @test
  40  * @key jfr
  41  * @requires vm.hasJFR
  42  * @library /test/lib
  43  * @run main/othervm jdk.jfr.event.metadata.TestEventMetadata
  44  */
  45 
  46 public class TestEventMetadata {
  47 
  48     /*
  49      * Short guide to writing event metadata
  50      * =====================================
  51 
  52      * Name
  53      * ----
  54      *
  55      * Symbolic name that is used to identify an event, or a field. Referred to
  56      * as "id" and "field" in trace.xml-files and @Name in the Java API. If it is
  57      * the name of an event, the name should be prefixed "jdk.", which
  58      * happens automatically for native events.
  59      *
  60      * The name should be short, but not so brief that collision is likely with
  61      * future events or fields. It should only consist of letters and numbers.


< prev index next >