<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/who-instruments-the-native-instrumenters---mostly-nerdless-lx6gpzjur" -->

---
title: Who instruments the native instrumenters? - Mostly nerdless
description: The meta-agent project now supports instrumenting native Java agents by hot-patching the JVM. Native agents use the JVMTI API (written in C/C++) and register...
canonical: https://daily.dev/posts/who-instruments-the-native-instrumenters---mostly-nerdless-lx6gpzjur
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Who instruments the native instrumenters? - Mostly nerdless | daily.dev
og:description: The meta-agent project now supports instrumenting native Java agents by hot-patching the JVM. Native agents use the JVMTI API (written in C/C++) and register...
og:url: https://daily.dev/posts/who-instruments-the-native-instrumenters---mostly-nerdless-lx6gpzjur
og:image: https://api.daily.dev/og/posts/lx6gpZJur.png
og:image:alt: Who instruments the native instrumenters? - Mostly nerdless
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Who instruments the native instrumenters? - Mostly nerdless

**[Mostly Nerdless](https://daily.dev/sources/mostly-nerdless)** · 10 min read · 0 upvotes · 0 comments

## Summary

The meta-agent project now supports instrumenting native Java agents by hot-patching the JVM. Native agents use the JVMTI API (written in C/C++) and register ClassFileLoadHook callbacks via SetEventCallbacks. The technique works by overriding the SetEventCallbacks function pointer in the JVMTI environment struct so the meta-agent intercepts all subsequent agent registrations. To support multiple agents, a fixed array of wrapper functions is generated via macros. Communication between the native wrapper and the Java meta-agent is handled through temporary files in /tmp to avoid circular class loading issues. This enables visibility into bytecode transformations performed by native agents like async-profiler's method tracer, and even reveals that the Java instrumentation agent (libinstrument) instruments itself.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mostlynerdless.de/blog/2025/11/20/who-instruments-the-native-instrumenters/>

## Similar posts on daily.dev

- [foojay – a place for friends of OpenJDK](https://daily.dev/posts/foojay-a-place-for-friends-of-openjdk-lwyzoctef) · Foojay.io · 0 upvotes · 0 comments
- [Decapsulation: Breaking Java Strong Encapsulation](https://daily.dev/posts/decapsulation-breaking-java-strong-encapsulation-xzmoii8fd) · Awesome Java Newsletter · 3 upvotes · 0 comments
- [Introduction to JVM Method Profiling](https://daily.dev/posts/introduction-to-jvm-method-profiling-sm5qpzdic) · SoftwareMill · 0 upvotes · 0 comments
- [React Native Internals: Decoding JS-to-Native Communication in the New Architecture](https://daily.dev/posts/react-native-internals-decoding-js-to-native-communication-in-the-new-architecture-mazf9aedd) · Medium · 0 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java)

[View this post on daily.dev](https://daily.dev/posts/who-instruments-the-native-instrumenters---mostly-nerdless-lx6gpzjur)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Who instruments the native instrumenters? - Mostly nerdless","url":"https://daily.dev/posts/who-instruments-the-native-instrumenters---mostly-nerdless-lx6gpzjur","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/who-instruments-the-native-instrumenters---mostly-nerdless-lx6gpzjur"},"datePublished":"2026-03-16T08:14:35.934Z","dateModified":"2026-03-16T08:22:40.410Z","description":"The meta-agent project now supports instrumenting native Java agents by hot-patching the JVM. Native agents use the JVMTI API (written in C/C++) and register...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0e2520e99a36310c37824d557f449e96?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0e2520e99a36310c37824d557f449e96?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Mostly Nerdless","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Mostly Nerdless","logo":"https://media.daily.dev/image/upload/s--O36Lcvjr--/f_auto,q_auto/v1773648778/logos/mostly-nerdless?_a=BAMAMiiu0","url":"https://daily.dev/sources/mostly-nerdless"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/who-instruments-the-native-instrumenters---mostly-nerdless-lx6gpzjur","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Mostly Nerdless","item":"https://daily.dev/sources/mostly-nerdless"},{"@type":"ListItem","position":3,"name":"Who instruments the native instrumenters? - Mostly nerdless"}]}
```

