equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
67 // package private |
67 // package private |
68 PlatformEventType(String name, long id, boolean isJDK, boolean dynamicSettings) { |
68 PlatformEventType(String name, long id, boolean isJDK, boolean dynamicSettings) { |
69 super(name, Type.SUPER_TYPE_EVENT, id); |
69 super(name, Type.SUPER_TYPE_EVENT, id); |
70 this.dynamicSettings = dynamicSettings; |
70 this.dynamicSettings = dynamicSettings; |
71 this.isJVM = Type.isDefinedByJVM(id); |
71 this.isJVM = Type.isDefinedByJVM(id); |
72 this.isMethodSampling = name.equals(Type.EVENT_NAME_PREFIX + "ExecutionSample") || name.equals(Type.EVENT_NAME_PREFIX + "NativeMethodSample"); |
72 this.isMethodSampling = isJVM && (name.equals(Type.EVENT_NAME_PREFIX + "ExecutionSample") || name.equals(Type.EVENT_NAME_PREFIX + "NativeMethodSample")); |
73 this.isJDK = isJDK; |
73 this.isJDK = isJDK; |
74 this.stackTraceOffset = stackTraceOffset(name, isJDK); |
74 this.stackTraceOffset = stackTraceOffset(name, isJDK); |
75 } |
75 } |
76 |
76 |
77 private static int stackTraceOffset(String name, boolean isJDK) { |
77 private static int stackTraceOffset(String name, boolean isJDK) { |