Kevin Gosse
banner
kevingosse.net
Kevin Gosse
@kevingosse.net
Principal engineer at JetBrains, passionate about .NET, performance, and debugging. Microsoft MVP. Co-author of Pro .NET Memory Management (2nd edition)
There are Mondays, and then there are "the computer doesn't recognize the dev SSD anymore" Mondays.

Samsung 990 Pro 2TB. I tried pretty much everything I could think of, including moving it to a different M2 slot. Suggestions are welcome. The drive doesn't appear in the bios.
December 8, 2025 at 9:04 AM
I was investigating a crash, and pasted my windbg output to ChatGPT to see if it could come up with any lead.

It noticed something that I completely missed, a memory area that I dumped in binary was actually a string (even though it's not supposed to be). That's really nice and unexpected.
December 2, 2025 at 8:47 AM
Focusing on the Rust Unwrap in the CloudFlare outage is really the scalability equivalent of "When a sage points to the moon, all the fool sees is the finger".

At that scale, failures *will* happen. Programming error are unavoidable. What's interesting is why it took down the entire system.
November 19, 2025 at 10:56 AM
Fun fact: you can't use print screen to capture a screenshot of a crash of SnippingTool
November 6, 2025 at 8:31 AM
Reposted by Kevin Gosse
#UCP25 | Kevin Gosse - The Hidden Life of Method Calls

Kevin reveals in his session what really happens when your code runs:
➡️ calling conventions
➡️ stack frames
➡️ JIT compilation
➡️ virtual dispatch
➡️ CPU-level mechanics

➡️ prague.updateconf.net

#DotNet #Performance @kevingosse.net @woodruff.dev
November 6, 2025 at 8:11 AM
I had a ton of fun at Techorama NL. It's not everyday that you get a chance to debug variadic .NET functions on a giant movie theater screen.
November 1, 2025 at 9:35 AM
We are getting closer to the release of Resharper 2025.3 , so I ran some performance tests to see how much we improved compared to 2025.2.

For this iteration, I focused my effort mainly on the huge Datadog.Trace solution, available on the DataDog/dd-trace-dotnet repository.

Results below 👇
October 30, 2025 at 7:04 PM
I just published a new article: Using profiler function hooks in .NET with Silhouette.
In the process, we also learn how to use static linking with NativeAOT.

minidump.net/using-functi...
Using profiler function hooks in .NET with Silhouette
In this article, we see what are function hooks, and how to use them in .NET with Silhouette. We also learn how to statically link a library with NativeAOT.
minidump.net
October 21, 2025 at 11:49 AM
Reposted by Kevin Gosse
New blog post:
In 2021 I found an invisible memory leak in a tool (VS Code) that I have never used. Impossible? Easy:
randomascii.wordpress.com/2025/10/09/f...
Finding a VS Code Memory Leak
In 2021 I found a huge memory leak in VS code, totalling around 64 GB when I first saw it, but with no actual limit on how high it could go. I found this leak despite two obstacles that should have…
randomascii.wordpress.com
October 9, 2025 at 8:27 PM
There's an even more adverse effect to the way closures are allocated:
sharplab.io#v2:EYLgxg9gT...

Because the same closure is reused for different calls, you can end up extending the lifetime of some of your objects without realizing it.
September 26, 2025 at 1:28 PM
Top thing I wish I had known earlier as a software engineer: before leaving a company, make sure to download your favorite slack emojis, so you don't have to frenetically look for them on the web when you realize they're missing from the new slack.
September 24, 2025 at 7:18 AM
Worked at Datadog, encountered crashes because of mysterious race-conditions in .NET writeable metadata: github.com/dotnet/runti...

Moved to JetBrains, encountered crashes because of mysterious race-conditions in .NET writeable metadata: github.com/dotnet/runti...

I think I'm cursed.
September 22, 2025 at 3:14 PM
As requested, I published an article about how the UI profiler works: minidump.net/measuring-ui...
It allows me to measure the responsiveness of Visual Studio when running with ReSharper, in various conditions.

I also made the source code available on github: github.com/kevingosse/U...
September 18, 2025 at 12:54 PM
Congrats to Microsoft on this new release, I've been using it for a few weeks now and it really feels great.

Note that Resharper is already compatible, if you want to try it!
September 10, 2025 at 7:01 AM
Not entirely sure what I'm going to do with all that money.
September 3, 2025 at 10:02 AM
I just discovered that whenever you create a closure in a generic C# method, the closure is also generic even when it's not needed.

This is very frustrating to me because generics cause performance issues in Resharper (see bsky.app/profile/kevi...)

sharplab.io#v2:EYLgxg9gT...
September 1, 2025 at 2:55 PM
Monday
September 1, 2025 at 8:10 AM
I can't recommend strongly enough to use an unlimited online backup service (I use @backblaze.bsky.social). Backup your whole disk and forget about it.
Just today, I realized I lost some code I wrote months ago (~2 days of work). Painlessly restored it from the automatic backup.
August 28, 2025 at 3:14 PM
To help reduce the number of UI freezes caused by Resharper, I built an internal tool to measure UI responsiveness.
Here, you can see the improvement between the current 2025.1 version (on the left) and the upcoming 2025.2 version (on the right) with out-of-process enabled.
July 28, 2025 at 12:58 PM
As I work on Resharper performance, I learn about limitations of .NET (at least, .NET Framework) that I wasn't aware of. Here, I shaved 1 second of CPU time on startup by... removing a call to Array.Empty<T>.
July 23, 2025 at 10:31 AM
Working on performance, it's a lot of time wasted on dead-ends and getting the impression of making no progress, and then suddenly managing to shave 10 seconds of CPU time off R# startup.
July 18, 2025 at 3:21 PM
One thing I like about working on a new codebase is finding all those low-hanging fruits, optimizations that have a significant impact for a relatively low effort.

Here, before/after, squashing ~140 MB of heap allocations from Resharper licensing code.
July 8, 2025 at 10:17 AM
I really enjoyed participating to the last 2codeOrNot2code, so I'm happy to repeat the experience. This time, we will have some fun with functions, unveiling interesting details about what happens when you call them. If you like to understand how things work, don't miss it!
July 8, 2025 at 7:36 AM
I'm experimenting with interfacing dnlib with my Silhouette library. The .NET profiling API provides almost no helper at all to manipulate IL, it just exposes the method body as a binary blob. Having access to dnlib greatly simplifies IL rewriting.

github.com/kevingosse/S...
July 5, 2025 at 3:00 PM
I released v2.0.0 of Silhouette, my library to write .NET profilers in C#. The main change is the addition of IMetadataImport2. There are a few small breaking changes, so I'm embracing semver and bumping the major version number.
github.com/kevingosse/S...
Release v2.0.0 · kevingosse/Silhouette
Added IMetadataImport2 interface Breaking changes: Removed the KnownGuids class. The GUIDs are now available from their respective interfaces. ICorProfilerInfo.GetModuleMetaData now returns an In...
github.com
June 22, 2025 at 9:43 AM