Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
2732aa5
WIP
jbachorik Feb 11, 2022
3e32dfa
Allocator impl
jbachorik Feb 15, 2022
5a1d1f2
WIP
jbachorik Feb 16, 2022
e03c2e9
WIP
jbachorik Feb 17, 2022
b905989
More WIP
jbachorik Feb 24, 2022
aea6550
More WIP
jbachorik Feb 25, 2022
0e88f1e
Merge branch 'master' into jb/tracing_context
jbachorik Feb 25, 2022
0b92c51
Disable event stacktrace
jbachorik Feb 25, 2022
6a2aa2d
Process context data only if trace is published
jbachorik Feb 25, 2022
c34b127
Reduce logging and increase the global allocator limit
jbachorik Feb 25, 2022
9e7d696
Reduce logging and data collection
jbachorik Feb 25, 2022
4759376
Increase the allocator limt
jbachorik Feb 25, 2022
7252306
Emit metrics to better understand the implementation behaviour
jbachorik Feb 28, 2022
6f27da6
Perform resource management at the span level
jbachorik Feb 28, 2022
6ee3ecb
Disable logging finalizing non-finished span
jbachorik Feb 28, 2022
1e25cb2
Use versioned tag
jbachorik Feb 28, 2022
d1c4836
Delete unused class
jbachorik Feb 28, 2022
8b18ab1
Fix direct allocator
jbachorik Mar 1, 2022
b3b0f5d
Wip async-profiler context events
jbachorik Mar 4, 2022
bde210c
Fix varint encoding
jbachorik Mar 7, 2022
f8aa4c0
Merge branch 'master' into jb/tracing_context
jbachorik Mar 7, 2022
3243ec4
Working correct recordings
jbachorik Mar 7, 2022
dd8b4fc
Code cleanup WIP
jbachorik Mar 9, 2022
b9c2589
Merge branch 'master' into jb/tracing_context
jbachorik Mar 10, 2022
131b432
Code cleanup WIP
jbachorik Mar 10, 2022
db593a9
Add allocator tests
jbachorik Mar 10, 2022
d6ddfea
Improve positional access to allocated buffers
jbachorik Mar 10, 2022
517d195
Work WIP
jbachorik Mar 11, 2022
511c074
Fixes and tests
jbachorik Mar 14, 2022
552626c
Merge branch 'master' into jb/tracing_context
jbachorik Mar 14, 2022
3219502
Adjust to changes in master
jbachorik Mar 14, 2022
da96175
Remove extraneous logging
jbachorik Mar 14, 2022
2e59876
Remove extraneous logging
jbachorik Mar 14, 2022
8eddd53
Improve test coverage and fix accidental bugs
jbachorik Mar 14, 2022
27067d4
Eliminate non-essential logging
jbachorik Mar 14, 2022
3c182bd
Update async profiler dependency
jbachorik Mar 15, 2022
58002d4
Prevent the delayed tracker from keeping the reference to source
jbachorik Mar 15, 2022
bd9b14f
Minor logging and testing changes
jbachorik Mar 15, 2022
a31a3db
Unfinalize PendingTrace
jbachorik Mar 15, 2022
e629923
Store tick frequency multiplier and cache the computed interval data
jbachorik Mar 17, 2022
05751c9
The agent jar size increased slightly
jbachorik Mar 17, 2022
3028d8a
Fix tests
jbachorik Mar 17, 2022
f912b05
Add detailed description of the tracing context binary format
jbachorik Mar 17, 2022
2eb7cc5
Exclude Base64Encoder from jacoco
jbachorik Mar 17, 2022
7ca8c05
Slightly improve stability
jbachorik Mar 17, 2022
f67f22b
Reformat
jbachorik Mar 17, 2022
1531e2e
Merge branch 'master' into jb/tracing_context
jbachorik Mar 18, 2022
b0855c8
Update the access to instrumentation
jbachorik Mar 18, 2022
bdff85d
Update the java version selection
jbachorik Mar 18, 2022
0d4c28c
Reorder module defs
jbachorik Mar 18, 2022
2c0e39e
Remove whitespace diff
jbachorik Mar 18, 2022
2c20c4c
Disable a helper test method
jbachorik Mar 18, 2022
e07e1c8
Initialize IntervalBlobWriter from AuxiliaryAsyncProfiler constructor
jbachorik Mar 18, 2022
f26e819
Differentiate deactivate and maybedeactivate methods
jbachorik Mar 18, 2022
731dafc
Fix thread-safety of LongSequence
jbachorik Mar 18, 2022
55f812e
All methods in LongSequence need to be guarded
jbachorik Mar 18, 2022
3f4ce3a
Fix a possible data race betwen persist and release
jbachorik Mar 21, 2022
b75233c
Allow enabling/disabling the context interval events
jbachorik Mar 21, 2022
5746f10
Fix test coverage
jbachorik Mar 21, 2022
be04958
Make jacoco happy
jbachorik Mar 21, 2022
d87c744
More jacoco joy
jbachorik Mar 22, 2022
0dfbc34
More jacoco joy
jbachorik Mar 23, 2022
96a1ceb
More jacoco joy
jbachorik Mar 23, 2022
fc28d68
Fix JFR timestamp provider
jbachorik Mar 25, 2022
1e7d2bf
Use latest async profiler
jbachorik Mar 25, 2022
870b936
Merge branch 'master' into jb/tracing_context
jbachorik Mar 28, 2022
32880d2
Remove ContextInterval support
jbachorik Apr 7, 2022
ec5e111
Add epoch millis to interval blob
jbachorik Apr 7, 2022
c0c266c
Add missing import
jbachorik Apr 7, 2022
88237ac
Adjust jacoco exclusion
jbachorik Apr 7, 2022
c33c663
Remove the start ticks
jbachorik Apr 8, 2022
35a0314
Remove unnecessary field
jbachorik Apr 8, 2022
498c11c
Use optimized UTF8BytesString to store the tracing context tag
jbachorik Apr 8, 2022
d7f4af3
Update ap-tools version
jbachorik Apr 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,9 @@ private static void startProfilingAgent(final URL bootstrapURL, final boolean is
Thread.currentThread().setContextClassLoader(classLoader);
final Class<?> profilingAgentClass =
classLoader.loadClass("com.datadog.profiling.agent.ProfilingAgent");
final Method profilingInstallerMethod = profilingAgentClass.getMethod("run", Boolean.TYPE);
profilingInstallerMethod.invoke(null, isStartingFirst);
final Method profilingInstallerMethod =
profilingAgentClass.getMethod("run", Boolean.TYPE, ClassLoader.class);
profilingInstallerMethod.invoke(null, isStartingFirst, AGENT_CLASSLOADER);
/*
* Install the tracer hooks only when not using 'early start'.
* The 'early start' is happening so early that most of the infrastructure has not been set up yet.
Expand Down
1 change: 1 addition & 0 deletions dd-java-agent/agent-profiling/agent-profiling.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies {

api project(':dd-java-agent:agent-profiling:profiling-auxiliary')
implementation project(path: ':dd-java-agent:agent-profiling:profiling-auxiliary-async', configuration: 'shadow')
api project(':dd-java-agent:agent-profiling:profiling-context')
api project(':dd-java-agent:agent-profiling:profiling-uploader')
api project(':dd-java-agent:agent-profiling:profiling-controller')
api project(':dd-java-agent:agent-profiling:profiling-controller-openjdk')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ excludedClassesCoverage += [
'com.datadog.profiling.auxiliary.async.AsyncProfilerRecording',
'com.datadog.profiling.auxiliary.async.AsyncProfilerRecordingData',
// the config event is a simple data holder
'com.datadog.profiling.auxiliary.async.AsyncProfilerConfigEvent'
'com.datadog.profiling.auxiliary.async.AsyncProfilerConfigEvent',
// simple forwarder class to the native implementation
"com.datadog.profiling.auxiliary.async.ContextIntervalEventsWriter",
]

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apply from: "$rootDir/gradle/java.gradle"
apply plugin: 'idea'

ext {
minimumBranchCoverage = 0.6
minimumInstructionCoverage = 0.8
excludedClassesCoverage = [
// simple DTO
"com.datadog.profiling.context.PositionDecoder.*",
"com.datadog.profiling.context.JfrTimestampPatch",
// jacoco does not allow per-method excludes so, here we go
"com.datadog.profiling.context.ProfilerTracingContextTrackerFactory*",
"com.datadog.profiling.context.ProfilerTracingContextTracker.TimeTicksProvider*",
]
}

sourceSets {
"main_java11" {
java.srcDirs "${project.projectDir}/src/main/java11"
}
}

dependencies {
api project(':internal-api')

implementation deps.slf4j
main_java11CompileOnly deps.slf4j
implementation sourceSets.main_java11.output

testImplementation deps.junit5
testImplementation deps.mockito
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

compileMain_java11Java.doFirst {
setJavaVersion(it, 11)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

jar {
from sourceSets.main_java11.output
}
forbiddenApisMain_java11 {
failOnMissingClasses = false
}

idea {
module {
jdkName = '11'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.datadog.profiling.context;

import com.datadog.profiling.context.allocator.AllocatedBuffer;

/** A simple allocator definition */
public interface Allocator {
/**
* The size of the chunk the allocator opearates with
*
* @return size of the chunk the allocator opearates with
*/
int getChunkSize();

/**
* Allocate the {@code size} number of bytes aligned to the chunk size
*
* @param size the number of bytes to allocate
* @return the allocated byffer or {@literal null} when allocation fails
*/
AllocatedBuffer allocate(int size);

/**
* Allocate the {@code chunks} number of chunks
*
* @param chunks the number of chunks to allocate
* @return the allocated byffer or {@literal null} when allocation fails
*/
AllocatedBuffer allocateChunks(int chunks);
}
Loading