Class SecretPerfMarkImpl.PerfMarkImpl
java.lang.Object
io.perfmark.Impl
io.perfmark.impl.SecretPerfMarkImpl.PerfMarkImpl
- Enclosing class:
SecretPerfMarkImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static longThis is the generation of the recorded tasks.private static final intprivate static final intprivate static final Generatorprivate static final longprivate static final AtomicLongprivate static final Objectprivate static final MarkRecorderprivate static final longprivate static final Linkprivate static final Tag -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidprotected void<T> voidattachTag(String tagName, T tagObject, StringFunction<? super T> stringFunction) This method is needed to work with old version of perfmark-api.protected <T> voidprotected <T> voidattachTag(String tagName, T tagObject, ToIntFunction<? super T> intFunction) protected <T> voidattachTag(String tagName, T tagObject, ToLongFunction<? super T> longFunction) protected Tag(package private) static <T> StringderiveTagValue(String tagName, T tagObject, Function<? super T, ? extends String> stringFunction) (package private) static <T> longderiveTagValue(String tagName, T tagNameObject, ToIntFunction<? super T> intFunction) (package private) static <T> longderiveTagValue(String tagName, T tagNameObject, ToLongFunction<? super T> longFunction) (package private) static <T> StringderiveTaskValue(T taskNameObject, Function<? super T, String> stringFunction) protected voidprotected voidprotected voidprivate static longgetGen()(package private) static <T> voidhandleTagValueFailure(String tagName, T tagObject, Object stringFunction, Throwable cause) (package private) static <T> voidhandleTaskNameFailure(T taskNameObject, Object function, Throwable cause) private static booleanisEnabled(long gen) protected voidprotected LinklinkOut()private static voidlogEnabledChange(boolean value, boolean success) private static longmibrosFromGeneration(long currentGeneration) private static longmibrosFromNanos(long nanos) (package private) static longnextGeneration(long currentGeneration, long nanosSinceInit) protected voidsetEnabled(boolean value) protected booleansetEnabled(boolean value, boolean overload) private static booleansetEnabledQuiet(boolean value, long now) Returns true if successfully changed.protected voidprotected voidprotected voidprotected <T> voidstartTask(T taskNameObject, StringFunction<? super T> stringFunction) This method is needed to work with old version of perfmark-api.protected <T> voidprotected voidstopTask()protected voidprotected voidprotected voidMethods inherited from class Impl
packLink, packTag, unpackLinkId, unpackTagId, unpackTagName
-
Field Details
-
ENABLED_BIT_SPACE
private static final int ENABLED_BIT_SPACE- See Also:
-
GEN_TIMESTAMP_SPACE
private static final int GEN_TIMESTAMP_SPACE- See Also:
-
MAX_MIBROS
private static final long MAX_MIBROS- See Also:
-
NO_TAG
-
NO_LINK
-
INCREMENT
private static final long INCREMENT- See Also:
-
linkIdAlloc
-
generator
-
markRecorder
-
logger
-
actualGeneration
private static long actualGenerationThis is the generation of the recorded tasks. The bottom 8 bits [0-7] are reserved for opcode packing. Bit 9 [8] is used for detecting if PerfMark is enabled or not. Bit 10 [9] is unused. Bits 11-64 [10-647] are used for storing the time since Perfmark Was last / enabled or disabled. The units are in nanoseconds/1024, or (inaccurately) called mibros (like micros, but power of 2 based).
-
-
Constructor Details
-
PerfMarkImpl
-
-
Method Details
-
setEnabled
protected void setEnabled(boolean value) - Overrides:
setEnabledin classImpl
-
setEnabled
protected boolean setEnabled(boolean value, boolean overload) - Overrides:
setEnabledin classImpl
-
logEnabledChange
private static void logEnabledChange(boolean value, boolean success) -
setEnabledQuiet
private static boolean setEnabledQuiet(boolean value, long now) Returns true if successfully changed. -
nextGeneration
static long nextGeneration(long currentGeneration, long nanosSinceInit) -
mibrosFromGeneration
private static long mibrosFromGeneration(long currentGeneration) -
mibrosFromNanos
private static long mibrosFromNanos(long nanos) -
startTask
-
startTask
-
startTask
-
startTask
This method is needed to work with old version of perfmark-api. -
startTask
-
stopTask
-
stopTask
-
stopTask
-
stopTask
-
event
-
event
-
event
-
attachTag
-
attachTag
-
attachTag
This method is needed to work with old version of perfmark-api. -
attachTag
-
attachTag
-
attachTag
-
deriveTagValue
-
deriveTagValue
static <T> long deriveTagValue(String tagName, T tagNameObject, ToIntFunction<? super T> intFunction) -
deriveTagValue
static <T> long deriveTagValue(String tagName, T tagNameObject, ToLongFunction<? super T> longFunction) -
deriveTaskValue
-
handleTagValueFailure
-
handleTaskNameFailure
-
attachTag
-
attachTag
-
createTag
-
linkOut
-
linkIn
-
getGen
private static long getGen() -
isEnabled
private static boolean isEnabled(long gen)
-