10 ms·
Java 25's new CPU-Time Profiler
- electric_muse 1y ago[flagged]
- porridgeraisin 1y agoChatGPT
- lionkor 1y agowhat?
- alserio 1y agoI believe they are saying that the commenter looks a lot like karma farming with an llm, it leaves a lot of comments like this one
- sumanthvepa 1y agoWhat benefit could one possibly get by farming karma on site like hacker news. It's not like one can gather followers or something. I'm always mystified by folks who do this. Would love to understand the motivation.
- diggan 1y agoSame thing is widespread on reddit, usually for pushing specific products/projects/organizations into the limelight. Landing on the frontpage of reddit/HN drives huge amount of traffic, so obviously "optimizers" learned this, and started priming accounts for future vote-rings and what not, but they need to mix in real-looking content between the pushes so the accounts don't get banned.
- marginalia_nu 1y agoHaving multiple high karma accounts is useful in astroturfing, as moderators are (rightfully) more lenient on established community members than new accounts.
- binary132 1y agosomeone should write an LLM detector bot that just leaves this comment on all AI slop
- boroboro4 1y agoThank you for telling, I went through their comments and they all like this :-( While having substance very obviously AI generated
- electric_muse 1y agoYes, it is. Sort of. I’m running an experiment. A few days ago I flagged a piece someone else had written with ai. It has a specific cadence and some typical patterns. But many people seemed to buy it before I commented. I was surprised. Today I pushed the boundary further and it clearly was that boundary. Check my comment history. I started out just saying “rephrase this so it sounds tighter” and moved recently towards just jotting rough notes and saying “make an HN comment out of this” and then editing. I’ve been using gpt-5. I was going to see how Claude sonnet 4 performs at coming across as human-written / flagging some spidey senses. (This was all by hand.)
- vips7L 1y agoI personally find this to be completely unacceptable. No one comes here to discuss with AI. Please don’t do this.
- exabrial 1y agoThe JVMin in the last 6-8 years has been a powerhouse of innovation and cool features. Incredibly impressive!
- panny 1y agoAnd a thank you to Oracle for being a good steward of the language.
- reactordev 1y ago[flagged]
- ecshafer 1y agoOpenJDK is the specification implementation. A huge amount of the OpenJDK development is paid for by Oracle (And others).
- reactordev 1y ago[flagged]
- dialogbox 1y agoWhy do you think a good steward shouldn't have a financial interest?
- Twirrim 1y agoWhat rug pull do you picture could happen at this stage? OpenJDK is the reference spec. Fully open source. Stewarded by multiple companies. Even if Oracle somehow managed to force the whole thing closed source (not sure that's even possible?) you've got all the other contributors who'd "hell no", fork and away you go. Which version of Java do you think the community would go with? There's no way it'd work.
- exabrial 1y ago
- globalhsbc 1y ago[dead]
- tombert 1y agoI never thought I would be excited for a new release of Java, but ever since Java 21, I have grown to actually enjoy writing the language. Whomever is running it has really done a good job making the language actually fun to write in the last few years.
- w10-1 1y agoMark Reinhold runs it, having been there since 1.x days as the core tech lead. He also pushed the move to open source and fast release cycles. But mainly he seems to have recruited and developed good people. I can’t think of a more enduring lead facing more challenges, technical and organizational.
- carimura 1y agoYes Mark is the Chief Architect with vast responsibility, in addition is Chief Language Architect Brian Goetz [1] and the OpenJDK Amber Project members [2][3]. [1] https://inside.java/u/BrianGoetz/ https://inside.java/u/BrianGoetz/ [2] https://openjdk.org/census#amber https://openjdk.org/census#amber [3] https://openjdk.org/projects/amber/ https://openjdk.org/projects/amber/
- zerr 1y agoIf you care about performance at that level, you should not be using Java or any other language with a GC.
- arnold_palmur 1y agoIn my opinion this is a very outdated opinion.
- pjmlp 1y agoThankfully not everyone agrees. https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc We have already have had enough from anti-GC cargo cult from "manual memory management is great" folks. Having a GC (which RC is also an algorithm subset), doesn't preclude having other features.
- creata 1y agoAre there any public benchmarks for Perc? Or any hints as to what's going on inside?
- OtomotO 1y agoThere is also non manual, non GCed manual management. I agree that a GC can be a viable implementation of memory management though.
- pjmlp 1y agoThere isn't such thing, if you mean Rust, affine types systems require tree structures and have issues with multiple scopes, hence the memes with borrow checker. Which I would refer as compiler assisted, although not really a proper term. There is a reason outside Rust, everyone else is string to combine GC alongside affine/linear/effects/dependent types instead of one solution for everything. The productivity of having a GC, with the type system capabilities to go lower level, when the profiler says so. Although I have to conceded, Rust made a great job bringing ATS and Cyclone ideas into mainstream. Additionally with AI powered languages, naturally most of this will be automated anyway.
- okokwhatever 1y agoThe more I search for a new language to learn the more I want to go back to Java. I feel so nostalgic :)
- theanonymousone 1y agoI have repeatedly said this in multiple occasions: You start to really appreciate Java after you work with other languages.
- winrid 1y agoEspecially after you inherit a few huge JS or Python projects...
- parttimenerd 1y ago(author here) This is part of a series of blog post. The next blog posts are: https://mostlynerdless.de/blog/2025/07/30/java-25s-new-cpu-time-profiler-the-implementation-2/ https://mostlynerdless.de/blog/2025/07/30/java-25s-new-cpu-t... (on the implementation) https://mostlynerdless.de/blog/2025/08/25/java-25s-new-cpu-time-profiler-queue-sizing-3/ https://mostlynerdless.de/blog/2025/08/25/java-25s-new-cpu-t... (on sizing the queue) and a fourth on improving the performance: https://mostlynerdless.de/blog/2025/09/01/java-25s-new-cpu-time-profiler-removing-redundant-synchronization-4/ https://mostlynerdless.de/blog/2025/09/01/java-25s-new-cpu-t...
- eduction 1y agoMaybe add those links in the posts themselves. The first one mentions what the second one will be about, you could just turn that into a link. Or have a bullet list of all the links you add to each post in the series.
- parttimenerd 1y agoThanks for the recommendation.
- w10-1 1y agoThis is built on a Linux sampling API that offers more accuracy, but it is still sampling. For CPU tracing, with no sampling errors, use Apple’s M4 with the latest Xcode’s Instruments.
- parttimenerd 1y ago(author here) Xcode doesn't know about Java's internals, so it doesn't know about Java frames, although it can help with native traces.
- rr808 1y agoI just hope with new lightweight threads I never have to write async reactive code again. It was a such an unproductive mistake, most applications do not need that level of complexity - now we can confidently say no applications need that level of added complexity.
- mrkeen 1y agoIt was a better model for reasoning about concurrency, i.e. evaluate two expressions, rather than where virtual threads is headed, i.e. "you don't have to learn anything" - just spawn two threads, keep writing sequences of statements and pretend nothing's changed since the 90s. https://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf https://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-...
- piokoch 1y agoWell, I hoped too. The problem is that "lightweight" are not that lightweight, as they need garbage collection. So, in theory, one can create 100K threads on one machine, but in practice that's going to keep burning processor for GC cycles. Another thing is what those lightweight threads are doing? If they play with CPU that's ok, you pay GC penalty and that's all. But if they access limited resources (database, another HTTP service), etc. in real application you face the standard issue: you cannot hit the targeted system with any data you want, this external system will backfire, sooner or later. The good thing in reactive programming is that it does not try to pretend that above problem does not exist. It forces to handle errors, to handle backpressure, as those problems will not magically disappear when we switch to green threads, lightweight threads, etc. There is no free lunch here, network has its restrictions, databases has to write do disk eventually, and so on.
- kdps 1y ago> So, in theory, one can create 100K threads on one machine, but in practice that's going to keep burning processor for GC cycles. The focus on "100k threads" and GC overhead is a red herring. The real win isn't spawning a massive number of threads, but automatically yielding on network I/O, like e.g. goroutines do. In an I/O bound web application, you'd have a single virtual thread handling the whole request, just like a goroutine does. The GC overhead caused by the virtual thread is minuscule compared to the heap allocations caused by everything else going on in the request. If you really have a scenario for 100k virtual threads, they would not be short lived. > But if they access limited resources (database, another HTTP service), etc. in real application you face the standard issue: you cannot hit the targeted system with any data you want Then why would you do it? That sounds like an architectural problem, not a virtual thread problem. In an actor system, for example, you wouldn't hit the database directly from 100k different actors. > The good thing in reactive programming is that it does not try to pretend that above problem does not exist. This compares a high-level programming paradigm, complete with its own libraries and frameworks, to a single, low-level concurrency construct. The former is a layer of abstraction that hides complexity, while the latter is a fundamental building block that, by design, does not and cannot hide anything. > It forces to handle errors, to handle backpressure, as those problems will not magically disappear when we switch to green threads, lightweight threads, etc. Synchronous code handles errors in the most time-tested and understandable way there is. It is easy to reason about and easy to debug. Reactive programming requires explicit backpressure handling because its asynchronous nature creates the problem in the first place. The simplest form of "backpressure" in synchronous code with a limited amount of threads is the act of blocking. For anything more than that, there are the classic tools (blocking queues, semaphores...) or higher-level libraries built on top of them.
- back2dafucha 1y agoThe biggest problem with Java these days is java developers are not really good at all. I would say n the last 10 years 99 percent of "Java" devs cant competently read a stack trace. Im not sure why anyone would improve this language when the developers are so frankly pathetic. Let them use 1.8. The ecosystem has improved. Devs have gotten worse. Java has become a land of opportunists just trying to pass of their non-Java maybe non-programmer skills
- jmpavlec 1y agoReally curious what makes you say this. Do you see the same thing in other languages? I've worked with many great Java devs over the years and think I'm halfway decent myself after working with it for 16+ years. Are there some bad ones in between? Sure, but that's true of any language (especially javascript).
- janwas 1y agoCPU-time would over-emphasize regions where many threads are running, right? I find wall-time useful for finding serial regions that aren't yet parallelized. More detail here: https://github.com/dvyukov/perf-load https://github.com/dvyukov/perf-load. We recently implemented the same idea without requiring context-switch events: https://github.com/google/highway/blob/master/hwy/profiler.h#L283 https://github.com/google/highway/blob/master/hwy/profiler.h...