3 ms·
I consider myself a good Java programmer and I would never figure something like this out on my own. I'm ok with this fact.
by jareds 4y ago
I consider myself a good Java programmer and I would never figure something like this out on my own. I'm ok with this fact.
- koyote 4y agoI would say that good chunks are things that people who've had to work in high performance computing will know about or would be able to figure out. Having said that, this line is probably the most difficult part of figuring the whole thing out: > Based on the fact that (5) “repne scan” is a rather rare operation in the JVM codebase, we were able to link this snippet to the routine for subclass checking I am not a Java programmer, but surely something like the above is not common knowledge?
- sponaugle 4y agoI too found that interesting. I would not have guessed that the use of 'repne scas' ( scan a string ) would be uncommon in a large codebase... perhaps there is some particular reason why that would be well known if you did a lot of Java profiling.
- Aeolun 4y agoIt strikes me as something that comes back from Google if you search ‘repne scan’?
- saagarjha 4y agoAmusingly this is something you can synthesize without knowing what the instruction is, precisely because you don’t know what the instruction is. Most code is simple arithmetic and memory operations that are relatively well known. The use of specialty instructions is pretty rare and often a good way to identify specific code sequences. For example, I don’t really hear much about “vgetmantsd” but the fact that I don’t is a good sign it does a specialized operation that would make it a good needle. (Ok, I can probably guess what it does, but ignore that.)
- hinoki 4y agoI have no idea what the super class cache is used for, but as soon as I read that there was good performance 12% = 1/8 of the time, after trying to scale up a server workload, I immediately thought of false sharing. Different people have different skills, but it’s still interesting to read about things you’ll never use. EDIT: and as sibling points out, I haven’t heard of the REPNE scan before, so that’s something interesting to look up.
- Thaxll 4y agoIt's ok, for good Java dev I assume they know at least how to troubleshoot performance issue with JFR, if you need to go deeper in native / perf events that's more the job of a very senior or perf people.
- stickfigure 4y agoThe issue was not in Java, but in the C++ implementation of the JVM. I think you can be forgiven.