's Avatar

@forked-franz

88
Followers
35
Following
9
Posts
20.11.2024
Joined
Posts Following

Latest posts by @forked-franz

Preview
Re-enable sun.misc.Unsafe by default on Java 24+ by chrisvest · Pull Request #15296 · netty/netty See https://github.com/netty/netty/wiki/Java-24-and-sun.misc.Unsafe for more information. Motivation: In #14943 we disabled Unsafe by default on Java 24+, to avoid producing warnings from the JVM. ...

github.com/netty/netty/...

This is only needed for 4.1.x, in 4.2.x we are able to fix this in another way that does not require the usage of sun.misc.Unsafe

03.06.2025 20:48 👍 2 🔁 2 💬 0 📌 0
Post image

The Devoxx Belgium 2025 CFP is now OPEN!
➡️https://dvbe25.cfp.dev
This year we’re zooming in on Java 25 & AI Agents🤖
Got insights, hacks, or bold ideas? Share them with the dev community at #Devoxx 🔥

02.06.2025 06:38 👍 34 🔁 22 💬 2 📌 1

From @forked-franz.bsky.social : These days, lot of @openjdk.org loom fun:
github.com/franz1981/Ne...

Do you know that VT schedulers are inherited?
Which means that if you have your own and clinit some Key OpenJDK class, u risk to make your scheduler to leak into some JDK class (!)

31.05.2025 13:27 👍 1 🔁 1 💬 0 📌 0
Preview
Ahead Of Time Compilation: Validation This post finally gets to the much alluded to topic of Validation. As mentioned in a previous post, Validation is one of the two actions the JVM must perform to generate and execute AOT code; …

Today I learned that in IBM J9 not all classes are the same:

> "A ROM Class roughly corresponds to the contents of a .class file; it is not a complete class because it only references its superclass and implemented interfaces by name."

blog.openj9.org/2018/11/08/a...
github.com/eclipse-open...

30.05.2025 18:06 👍 3 🔁 1 💬 0 📌 0

❌ printf debugging
✅ segfault debugging

19.05.2025 13:24 👍 60 🔁 1 💬 2 📌 0
Post image

⏰ Starting soon! Join us for Quarkus Insights Ep. #206 as Andrea Peruffo & Hiram Chirino join us to talk about WebAssembly (WASM) & how it powers a wide range of apps & reveals potential for unique integrations & performance gains, in Java & Quarkus.

bit.ly/quarkusinsig...

19.05.2025 12:45 👍 0 🔁 2 💬 0 📌 0

It is likely a way to observe the dynamic of the system.
Probably it is more actionable to have predicates applied to an analysis of the same events

14.05.2025 19:59 👍 0 🔁 0 💬 0 📌 0

It looks cdn.jsdelivr.net/npm/timeline... but I could be wrong

14.05.2025 10:08 👍 0 🔁 0 💬 1 📌 0
Preview
8193513: add support for printing a stack trace on class loading by dougxc · Pull Request #14553 · openjdk/jdk In the development of libgraal, it has been very useful to see why a given class is loaded (e.g., trying to reduce startup time by avoiding unnecessary eager class loading). One way to do this is t...

TIL: since jdk22 you can use the JVM option -XX:LogClassLoadingCauseFor=com.mycompany.MyClass in conjunction with -Xlog:class+load+cause* to find out the stacktrace that triggers the load of the specify class.
see github.com/openjdk/jdk/...

13.05.2025 15:07 👍 19 🔁 10 💬 1 📌 0

Was fighting a "LinkageError: attempted duplicate class definition" for 3 days... took me 2 seconds with that option!

13.05.2025 15:09 👍 1 🔁 1 💬 1 📌 0

Many thanks 🙏

11.05.2025 15:09 👍 1 🔁 0 💬 0 📌 0
Preview
airhacks.fm podcast podcast with adam bien

The podcast episodes by @adambien.blog and @forked-franz.bsky.social talking low level Java performance stuff are 🙌🏻🙌🏻
I hope they do more
airhacks.fm#episode_343
airhacks.fm#episode_340

11.05.2025 14:20 👍 4 🔁 3 💬 1 📌 0

This is the JMC timeline or something different? 🙏

08.05.2025 14:47 👍 0 🔁 0 💬 2 📌 0
An anthropomorphic pig in a trench coat telling a man in military garb "I'd rather be a pig than a fascist"

An anthropomorphic pig in a trench coat telling a man in military garb "I'd rather be a pig than a fascist"

Showing kiddo Porco Rosso

04.05.2025 18:06 👍 48 🔁 1 💬 3 📌 0
Preview
GitHub - rigtorp/MPMCQueue: A bounded multi-producer multi-consumer concurrent queue written in C++11 A bounded multi-producer multi-consumer concurrent queue written in C++11 - rigtorp/MPMCQueue

A modified version of this: github.com/rigtorp/MPMC...

03.05.2025 19:41 👍 1 🔁 2 💬 1 📌 0
1024cores - Bounded MPMC queue According to the classification it's MPMC, array-based, fails on overflow, does not require GC, w/o priorities, causal FIFO, blocking producers and consumers queue. The algorithm is pretty simple and ...

Thanks for sharing! Yep, it is a refined version of www.1024cores.net/home/lock-fr...

I have designed an unbounded version of it which is more producer centric - and leverage x86 lock xadd - but very similar, in the core concept i.e. per-slot headers to independently track changes

03.05.2025 19:46 👍 1 🔁 0 💬 0 📌 0

(We need the queue to be lock-free even though the kernel is single-threaded because we may want to schedule a task from an interrupt handler, and if the interrupt fires during a task schedule that held a lock on the queue, the kernel would deadlock)

03.05.2025 09:08 👍 6 🔁 1 💬 1 📌 0
// memcpy that yields intermittently to avoid blocking the kernel thread
task<std::size_t> async_memcpy(void* destination, const void* source, std::size_t size) {
    constexpr std::size_t chunk_size = 4096;
    for (std::size_t offset = 0; offset < size; offset += chunk_size) {
        //copy a chunk of data, then...
        co_await reschedule; //reschedule the coroutine
    }
    co_return size;
}

task<unique_ptr<fat32>> fat32::mount(
  		driver::block_device& device, std::string_view mount_point) {
    auto fs = unique_ptr<fat32>(new fat32());
    // this should suspend fat32::mount until the read is complete
    auto boot_sector = co_await device.read(0, 1); //this eventually calls async_memcpy
    // etc.
}

task<> mount_initramfs() {
    // find initramfs memory, then...
    // this should suspend mount_initramfs until the mount is complete
    auto initramfs = co_await fat32::mount(initramfs_mem, "/");
    if (!initramfs) {
        com1.write("Failed to mount initramfs\n");
        co_return;
    }
    com1.write("Initramfs mounted at /\n");
}

// memcpy that yields intermittently to avoid blocking the kernel thread task<std::size_t> async_memcpy(void* destination, const void* source, std::size_t size) { constexpr std::size_t chunk_size = 4096; for (std::size_t offset = 0; offset < size; offset += chunk_size) { //copy a chunk of data, then... co_await reschedule; //reschedule the coroutine } co_return size; } task<unique_ptr<fat32>> fat32::mount( driver::block_device& device, std::string_view mount_point) { auto fs = unique_ptr<fat32>(new fat32()); // this should suspend fat32::mount until the read is complete auto boot_sector = co_await device.read(0, 1); //this eventually calls async_memcpy // etc. } task<> mount_initramfs() { // find initramfs memory, then... // this should suspend mount_initramfs until the mount is complete auto initramfs = co_await fat32::mount(initramfs_mem, "/"); if (!initramfs) { com1.write("Failed to mount initramfs\n"); co_return; } com1.write("Initramfs mounted at /\n"); }

The idea is that I have a cooperatively-scheduled single-threaded OS kernel that uses C++20 coroutines as its means of expressing tasks.

I want to be able to await on asynchronous tasks, and also manually yield back to the scheduler in the case of long-running computations.

Some examples:

03.05.2025 08:46 👍 7 🔁 1 💬 1 📌 0

CRT support

The performance is great and this is very easy to use for younger kids.

30.04.2025 14:37 👍 125 🔁 7 💬 10 📌 1

If anyone knows of resources for this, I am very much interested, as I am more or less fumbling around.

Getting a simple scheduler based on a lock free MPMC queue that works for basic coroutines was pretty straightforward, but as soon as those coroutines nest it becomes very headache-inducing.

02.05.2025 20:57 👍 11 🔁 1 💬 4 📌 0

Which mpmc one you used? Vjukov?

03.05.2025 19:05 👍 1 🔁 0 💬 1 📌 0

Trying to implement an OS-level scheduler for C++20 coroutines that supports symmetric transfer and my brain is melting

02.05.2025 20:51 👍 35 🔁 3 💬 4 📌 1
Preview
Zhaoxin’s KX-7000 Zhaoxin is a Chinese x86 CPU designer.

Hello you fine Internet folks,

Today's article we are deep-diving into the architecture of Zhaoxin's latest CPU series, the KX-7000. We compare the KX-7000 to the KX-6000 along with some older x86 CPUs.

Hope y'all enjoy!

open.substack.com/pub/chipsand...

old.chipsandcheese.com/2025/04/30/z...

30.04.2025 20:26 👍 7 🔁 1 💬 0 📌 0
Post image

I finally got my hard copy of @tartanllama.xyz's Building a Debugger and boy is it a treat! Not only is it a missing guide to DWARF for dummies like me, but it is also a gentle introduction to x64 ASM. Highly recommended! Kudos to @nostarchpress.bsky.social really my fav tech publisher :chefkiss:

30.04.2025 19:06 👍 14 🔁 2 💬 2 📌 0
Preview
JCtools vs JDK 24: to VarHandle or not VarHandle? · JCTools JCTools · Discussion #397 Since JDK 24 is coming I would like to assests the current level of performance of one of the most delicate and simple Q we offer: the spsc array q. This is the first stepping stone to decide if, d...

github.com/JCTools/JCTo...

by @forked-franz.bsky.social need to spend some time at this work 🤯
#jdk24 #jctools

22.04.2025 16:48 👍 2 🔁 1 💬 0 📌 0
Post image

We just integrated a performance improvement to Java String that will provide a ~10x performance boost in some applications where Strings are used as keys and where the associated values are constant foldable. This will make JDK 25 faster.

github.com/openjdk/jdk/...

22.04.2025 15:14 👍 77 🔁 21 💬 2 📌 1

I admit I'm a bit confused by the benchmark - especially why using MethodHandle. I would have VarHandle::loadFence + calling BlackHole::consume(string.hashcode)in a loop, since JMM should force to keep on loading the hash field, if not constant foldable

22.04.2025 17:30 👍 1 🔁 0 💬 0 📌 0
Are We Enterprise-Ready Yet? By Edoardo Vacchi & Andrea Peruffo @ Wasm I/O 2025
Are We Enterprise-Ready Yet? By Edoardo Vacchi & Andrea Peruffo @ Wasm I/O 2025 YouTube video by WASM I/O

🧩 Are We Enterprise-Ready Yet? By @evacchi.dev & @andreatp.bsky.social @ Wasm I/O 2025

▶️ Video: youtu.be/UyyVL-dDbCw

🔗 Slides: docs.google.com/presentation... #wasmio25

07.04.2025 15:47 👍 3 🔁 3 💬 1 📌 0
Preview
An Interview with Oxide's Bryan Cantrill Hello you fine Internet folks,

Hello you fine Internet folks,

Today we have an interview with @oxidecomputer.bsky.social's @bcantrill.bsky.social about Oxide and what hardware they are building and the reasons why.

Hope y'all enjoy!

open.substack.com/pub/chipsand...

old.chipsandcheese.com/2025/03/27/a...

youtu.be/5-nOIlrUqMM

28.03.2025 00:20 👍 32 🔁 7 💬 1 📌 0
Preview
The JVM’s Secret Bottleneck & The Next Wave in Spring AI and MCP, Thu, Mar 27, 2025, 6:30 PM | Meetup **Title: The JVM’s Secret Bottleneck by Sanne Grinovero (Lead of the opensource Hibernate project!)** This presentation will delve into a serious JVM performance issue that

Rare chance to see me in person in Singapore!

March 27 I'll present on an extremely interesting JVM performance topic:

www.meetup.com/singadev/eve...

Also looking forwards to network and discuss anything related to @quarkus.io , @hibernate.org , @commonhaus.org
😉

20.03.2025 13:58 👍 16 🔁 9 💬 1 📌 0