C# Class FyreVM.Profiling.Profiler

Tracks and analyzes a game's performance.
Mostrar archivo Open project: ChicagoDave/Zifmia

Public Methods

Method Description
GetResults ( ) : FyreVM.Profiling.ProfiledRoutine[]

Gets the current set of profiler results.

Profiler ( ) : System
ReadDebugSymbols ( Stream gameFile, Stream debugFile ) : void

Reads function names and addresses from a game debugging file.

ReadDescriptions ( string autoInfFile ) : void

Reads routine descriptions and definition points from a source file generated by Inform 7 (auto.inf).

This will probably break when the layout of auto.inf changes.

ReadSourceSymbols ( string sourceFile ) : void

Loads routine names and definition points from an Inform source file that wasn't generated by Inform 7 (for example, the .i6 template layer).

ResetStats ( ) : void

Clears the performance information that has been collected so far.

SetDefaultDescriptions ( ) : void

Naively assigns descriptions to routines based on their names.

Private Methods

Method Description
BillCurrentRoutine ( long elapsedCycles, System.TimeSpan elapsedTime ) : void
BumpHitCount ( ) : void
Enter ( uint address, long cycles ) : void

Records that the VM is entering a routine.

GetDefaultDescription ( string routine ) : string
GetRoutineRecord ( ) : ProfiledRoutine
Leave ( long cycles ) : void

Records that the VM is leaving the most recently entered routine.

ReadAddress ( Stream debugFile ) : uint
ReadLine ( Stream debugFile ) : SourceLine
ReadString ( Stream debugFile ) : string
SkipString ( Stream debugFile ) : bool
UpdateRecsFromSymbols ( ) : void

Method Details

GetResults() public method

Gets the current set of profiler results.
public GetResults ( ) : FyreVM.Profiling.ProfiledRoutine[]
return FyreVM.Profiling.ProfiledRoutine[]

Profiler() public method

public Profiler ( ) : System
return System

ReadDebugSymbols() public method

Reads function names and addresses from a game debugging file.
public ReadDebugSymbols ( Stream gameFile, Stream debugFile ) : void
gameFile Stream The game being profiled.
debugFile Stream The Inform debugging file (gameinfo.dbg).
return void

ReadDescriptions() public method

Reads routine descriptions and definition points from a source file generated by Inform 7 (auto.inf).
This will probably break when the layout of auto.inf changes.
public ReadDescriptions ( string autoInfFile ) : void
autoInfFile string
return void

ReadSourceSymbols() public method

Loads routine names and definition points from an Inform source file that wasn't generated by Inform 7 (for example, the .i6 template layer).
public ReadSourceSymbols ( string sourceFile ) : void
sourceFile string
return void

ResetStats() public method

Clears the performance information that has been collected so far.
public ResetStats ( ) : void
return void

SetDefaultDescriptions() public method

Naively assigns descriptions to routines based on their names.
public SetDefaultDescriptions ( ) : void
return void