Skip to content

kkokosa/Tune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Tune

The Ultimate .NET Experiment

Example Tune screenshot

The Ultimate .NET Experiment (Tune) as its purpose is to learn .NET internals and performance tuning by experiments with C# code. The main way of working with this tool is as follows:

  • write a sample, valid C# script which contains at least one class with public method taking a single string parameter. It will be executed by hitting Run button. This script can contain as many additional methods and classes as you wish. Just remember that first public method from the first public class will be executed (with single parameter taken from the input box below the script). You may also choose whether you want to build in Debug or Release mode (note: currently it is only x64 bit compilation). There are three predefined examples under File menu.
  • after clicking Run button, the script will be compiled and executed. Additionally, it will be decompiled both to IL (Intermediate Language) and assembly code in the corresponding tabs.
  • all the time Tune is running (including time during script execution) a graph with GC data is being drawn. It shows information about generation sizes and GC occurrences (illustrated as vertical lines with the number below indicating which generation has been triggered).

Note: As it is currently in very early 0.3 version, it can be treated as Proof Of Concept with many, many features still missing. But it is usable enough to have some fun with it already.

Overall architecture

Tune is built from a few very interesting pieces, which will be probably much more clearer to show on the following diagram than to describe in words:

Tune architecture

As you can see, it is using parts of SharpDevelop (ICSharpCode) and Mono.Cecil libraries to decompile IL. To decompile into ASM it is using ClrMd to find method address location in the memory and then use SharpDisasm (which is a libudis86 C library port). It additionally uses dbghelp.dll to resolve native symbols. ETW data are being processed by the TraceEvent library.

Building

Requirements:

  • Visual Studio 2017

Additional info and examples: