Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
How a Line of C# Runs on the CPU: From Source to IL, Assembly and Instructions
A line of C# reaches the CPU through two translations: Roslyn turns it into IL, and at run time the JIT turns that into machine code for the machine's ISA, which the CPU runs in a fetch-decode-execute cycle. We read the 30-byte x64 Tier-1 code of TotalQuantity line by line, compare it with its ARM64 version, the 789-byte decimal version and an unoptimized Tier-0 measurement, and explain the x86-64-v2 baseline in .NET 11.
Deep Analysis with PerfView: GC Stats, JIT Stats, Grouping/Folding and Diffing Two Traces
PerfView's power lies in GroupPats, Fold%, diffs and the GCStats/JITStats reports; since they all rest on the TraceEvent library, you can run the same analysis in code on Linux. In Bookstore we diff two traces to find that 2.6 seconds of a regression is GC waiting, measure with JITStats that ReadyToRun cuts the methods JIT-compiled at startup only from 980 to 928, and build a CI allocation gate whose noise we measured first.