Debugger: Profiler - Split out of memory tools and into its own window
This commit is contained in:
parent
107f8cf8c0
commit
5cdb86a323
17 changed files with 330 additions and 57 deletions
|
@ -284,6 +284,9 @@ namespace Mesen.GUI.Config
|
|||
public Point MemoryViewerLocation;
|
||||
public Point? ApuViewerLocation;
|
||||
|
||||
public Size ProfilerSize = new Size(0, 0);
|
||||
public Point ProfilerLocation;
|
||||
|
||||
public Point WindowLocation;
|
||||
public int WindowWidth = -1;
|
||||
public int WindowHeight = -1;
|
||||
|
|
|
@ -74,6 +74,8 @@ namespace Mesen.GUI.Config
|
|||
public XmlKeys OpenMemoryTools = Keys.Control | Keys.M;
|
||||
[ShortcutName("Open PPU Viewer")]
|
||||
public XmlKeys OpenPpuViewer = Keys.Control | Keys.P;
|
||||
[ShortcutName("Open Performance Profiler")]
|
||||
public XmlKeys OpenProfiler = Keys.Control | Keys.Y;
|
||||
[ShortcutName("Open Script Window")]
|
||||
public XmlKeys OpenScriptWindow = Keys.Control | Keys.N;
|
||||
[ShortcutName("Open Trace Logger")]
|
||||
|
|
34
GUI.NET/Debugger/Controls/ctrlProfiler.Designer.cs
generated
34
GUI.NET/Debugger/Controls/ctrlProfiler.Designer.cs
generated
|
@ -30,12 +30,12 @@
|
|||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btnReset = new System.Windows.Forms.Button();
|
||||
this.lstFunctions = new Mesen.GUI.Controls.DoubleBufferedListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.colFunction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.colExclusiveTimePercent = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -54,13 +54,13 @@
|
|||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(514, 307);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(673, 307);
|
||||
this.tableLayoutPanel1.TabIndex = 3;
|
||||
//
|
||||
// btnReset
|
||||
//
|
||||
this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnReset.Location = new System.Drawing.Point(436, 281);
|
||||
this.btnReset.Location = new System.Drawing.Point(595, 281);
|
||||
this.btnReset.Name = "btnReset";
|
||||
this.btnReset.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnReset.TabIndex = 5;
|
||||
|
@ -71,12 +71,12 @@
|
|||
// lstFunctions
|
||||
//
|
||||
this.lstFunctions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.colFunction,
|
||||
this.columnHeader4,
|
||||
this.columnHeader3,
|
||||
this.columnHeader5,
|
||||
this.columnHeader2,
|
||||
this.columnHeader6});
|
||||
this.colExclusiveTimePercent});
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.lstFunctions, 2);
|
||||
this.lstFunctions.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lstFunctions.FullRowSelect = true;
|
||||
|
@ -85,16 +85,17 @@
|
|||
this.lstFunctions.Location = new System.Drawing.Point(0, 0);
|
||||
this.lstFunctions.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.lstFunctions.Name = "lstFunctions";
|
||||
this.lstFunctions.Size = new System.Drawing.Size(514, 278);
|
||||
this.lstFunctions.Size = new System.Drawing.Size(673, 278);
|
||||
this.lstFunctions.TabIndex = 7;
|
||||
this.lstFunctions.UseCompatibleStateImageBehavior = false;
|
||||
this.lstFunctions.View = System.Windows.Forms.View.Details;
|
||||
this.lstFunctions.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lstFunctions_ColumnClick);
|
||||
this.lstFunctions.DoubleClick += new System.EventHandler(this.lstFunctions_DoubleClick);
|
||||
//
|
||||
// columnHeader1
|
||||
// colFunction
|
||||
//
|
||||
this.columnHeader1.Text = "Function (Entry Addr)";
|
||||
this.colFunction.Text = "Function (Entry Addr)";
|
||||
this.colFunction.Width = 120;
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
|
@ -103,19 +104,22 @@
|
|||
// columnHeader3
|
||||
//
|
||||
this.columnHeader3.Text = "Inclusive Time (Cyc)";
|
||||
this.columnHeader3.Width = 137;
|
||||
this.columnHeader3.Width = 79;
|
||||
//
|
||||
// columnHeader5
|
||||
//
|
||||
this.columnHeader5.Text = "Inclusive Time (%)";
|
||||
this.columnHeader5.Width = 70;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Exclusive Time (Cyc)";
|
||||
this.columnHeader2.Width = 72;
|
||||
//
|
||||
// columnHeader6
|
||||
// colExclusiveTimePercent
|
||||
//
|
||||
this.columnHeader6.Text = "Exclusive Time (%)";
|
||||
this.colExclusiveTimePercent.Text = "Exclusive Time (%)";
|
||||
this.colExclusiveTimePercent.Width = 57;
|
||||
//
|
||||
// ctrlProfiler
|
||||
//
|
||||
|
@ -124,7 +128,7 @@
|
|||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.Name = "ctrlProfiler";
|
||||
this.Size = new System.Drawing.Size(514, 307);
|
||||
this.Size = new System.Drawing.Size(673, 307);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
|
@ -134,11 +138,11 @@
|
|||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Button btnReset;
|
||||
private Mesen.GUI.Controls.DoubleBufferedListView lstFunctions;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader colFunction;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader5;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader6;
|
||||
private System.Windows.Forms.ColumnHeader colExclusiveTimePercent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,10 +26,18 @@ namespace Mesen.GUI.Debugger.Controls
|
|||
public ctrlProfiler()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);
|
||||
if(!designMode) {
|
||||
lstFunctions.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
|
||||
int newWidth = Math.Max(colFunction.Width * 2, 250);
|
||||
colExclusiveTimePercent.Width -= (newWidth - colFunction.Width) + 30;
|
||||
colFunction.Width = newWidth;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace Mesen.GUI.Debugger
|
|||
case DebugWindow.ApuViewer: frm = new frmApuViewer(); frm.Icon = Properties.Resources.Audio; break;
|
||||
case DebugWindow.EventViewer: frm = new frmEventViewer(); frm.Icon = Properties.Resources.NesEventViewer; break;
|
||||
case DebugWindow.TextHooker: frm = new frmTextHooker(); frm.Icon = Properties.Resources.Font; break;
|
||||
case DebugWindow.Profiler: frm = new frmProfiler(); frm.Icon = Properties.Resources.Speed; break;
|
||||
}
|
||||
_openedWindows.Add(frm);
|
||||
frm.FormClosed += Debugger_FormClosed;
|
||||
|
@ -145,6 +146,7 @@ namespace Mesen.GUI.Debugger
|
|||
case DebugWindow.Debugger: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmDebugger));
|
||||
case DebugWindow.ApuViewer: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmApuViewer));
|
||||
case DebugWindow.TextHooker: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmTextHooker));
|
||||
case DebugWindow.Profiler: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmProfiler));
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -181,5 +183,6 @@ namespace Mesen.GUI.Debugger
|
|||
ApuViewer,
|
||||
EventViewer,
|
||||
TextHooker,
|
||||
Profiler,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ namespace Mesen.GUI.Debugger
|
|||
GetMember(nameof(DebuggerShortcutsConfig.OpenDebugger)),
|
||||
GetMember(nameof(DebuggerShortcutsConfig.OpenEventViewer)),
|
||||
GetMember(nameof(DebuggerShortcutsConfig.OpenMemoryTools)),
|
||||
GetMember(nameof(DebuggerShortcutsConfig.OpenProfiler)),
|
||||
GetMember(nameof(DebuggerShortcutsConfig.OpenPpuViewer)),
|
||||
GetMember(nameof(DebuggerShortcutsConfig.OpenScriptWindow)),
|
||||
GetMember(nameof(DebuggerShortcutsConfig.OpenTextHooker)),
|
||||
|
|
11
GUI.NET/Debugger/frmDebugger.Designer.cs
generated
11
GUI.NET/Debugger/frmDebugger.Designer.cs
generated
|
@ -191,6 +191,7 @@ namespace Mesen.GUI.Debugger
|
|||
this.mnuEventViewer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuMemoryViewer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPpuViewer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuProfiler = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuScriptWindow = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuTextHooker = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuTraceLogger = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -1670,6 +1671,7 @@ namespace Mesen.GUI.Debugger
|
|||
this.mnuAssembler,
|
||||
this.mnuEventViewer,
|
||||
this.mnuMemoryViewer,
|
||||
this.mnuProfiler,
|
||||
this.mnuPpuViewer,
|
||||
this.mnuScriptWindow,
|
||||
this.mnuTextHooker,
|
||||
|
@ -1724,6 +1726,14 @@ namespace Mesen.GUI.Debugger
|
|||
this.mnuPpuViewer.Text = "PPU Viewer";
|
||||
this.mnuPpuViewer.Click += new System.EventHandler(this.mnuNametableViewer_Click);
|
||||
//
|
||||
// mnuProfiler
|
||||
//
|
||||
this.mnuProfiler.Image = global::Mesen.GUI.Properties.Resources.Speed;
|
||||
this.mnuProfiler.Name = "mnuProfiler";
|
||||
this.mnuProfiler.Size = new System.Drawing.Size(194, 22);
|
||||
this.mnuProfiler.Text = "Performance Profiler";
|
||||
this.mnuProfiler.Click += new System.EventHandler(this.mnuProfiler_Click);
|
||||
//
|
||||
// mnuScriptWindow
|
||||
//
|
||||
this.mnuScriptWindow.Image = global::Mesen.GUI.Properties.Resources.Script;
|
||||
|
@ -2227,5 +2237,6 @@ namespace Mesen.GUI.Debugger
|
|||
private System.Windows.Forms.ToolStripMenuItem mnuOpenSpriteViewer;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuOpenPaletteViewer;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem30;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuProfiler;
|
||||
}
|
||||
}
|
|
@ -283,6 +283,7 @@ namespace Mesen.GUI.Debugger
|
|||
mnuScriptWindow.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenScriptWindow));
|
||||
mnuTraceLogger.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenTraceLogger));
|
||||
mnuTextHooker.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenTextHooker));
|
||||
mnuProfiler.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenProfiler));
|
||||
|
||||
mnuOpenNametableViewer.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenNametableViewer));
|
||||
mnuOpenChrViewer.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenChrViewer));
|
||||
|
@ -1550,6 +1551,11 @@ namespace Mesen.GUI.Debugger
|
|||
DebugWindowManager.OpenDebugWindow(DebugWindow.ScriptWindow);
|
||||
}
|
||||
|
||||
private void mnuProfiler_Click(object sender, EventArgs e)
|
||||
{
|
||||
DebugWindowManager.OpenDebugWindow(DebugWindow.Profiler);
|
||||
}
|
||||
|
||||
private void mnuAssembler_Click(object sender, EventArgs e)
|
||||
{
|
||||
DebugWindowManager.OpenDebugWindow(DebugWindow.Assembler);
|
||||
|
|
45
GUI.NET/Debugger/frmMemoryViewer.Designer.cs
generated
45
GUI.NET/Debugger/frmMemoryViewer.Designer.cs
generated
|
@ -96,6 +96,7 @@
|
|||
this.mnuIgnoreRedundantWrites = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuEnablePerByteNavigation = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuByteEditingMode = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuHighlightCurrentRowColumn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuGoToAll = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuGoTo = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -108,16 +109,12 @@
|
|||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tpgAccessCounters = new System.Windows.Forms.TabPage();
|
||||
this.ctrlMemoryAccessCounters = new Mesen.GUI.Debugger.Controls.ctrlMemoryAccessCounters();
|
||||
this.tpgProfiler = new System.Windows.Forms.TabPage();
|
||||
this.ctrlProfiler = new Mesen.GUI.Debugger.Controls.ctrlProfiler();
|
||||
this.mnuHighlightCurrentRowColumn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.tabMain.SuspendLayout();
|
||||
this.tpgMemoryViewer.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.tpgAccessCounters.SuspendLayout();
|
||||
this.tpgProfiler.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ctrlHexViewer
|
||||
|
@ -667,6 +664,14 @@
|
|||
this.mnuByteEditingMode.Text = "Use per-byte editing mode";
|
||||
this.mnuByteEditingMode.CheckedChanged += new System.EventHandler(this.mnuByteEditingMode_CheckedChanged);
|
||||
//
|
||||
// mnuHighlightCurrentRowColumn
|
||||
//
|
||||
this.mnuHighlightCurrentRowColumn.CheckOnClick = true;
|
||||
this.mnuHighlightCurrentRowColumn.Name = "mnuHighlightCurrentRowColumn";
|
||||
this.mnuHighlightCurrentRowColumn.Size = new System.Drawing.Size(256, 22);
|
||||
this.mnuHighlightCurrentRowColumn.Text = "Highlight current row/column";
|
||||
this.mnuHighlightCurrentRowColumn.CheckedChanged += new System.EventHandler(this.mnuHighlightCurrentRowColumn_CheckedChanged);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -727,7 +732,6 @@
|
|||
//
|
||||
this.tabMain.Controls.Add(this.tpgMemoryViewer);
|
||||
this.tabMain.Controls.Add(this.tpgAccessCounters);
|
||||
this.tabMain.Controls.Add(this.tpgProfiler);
|
||||
this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabMain.Location = new System.Drawing.Point(0, 24);
|
||||
this.tabMain.Name = "tabMain";
|
||||
|
@ -780,34 +784,6 @@
|
|||
this.ctrlMemoryAccessCounters.TabIndex = 0;
|
||||
this.ctrlMemoryAccessCounters.TextZoom = 100;
|
||||
//
|
||||
// tpgProfiler
|
||||
//
|
||||
this.tpgProfiler.Controls.Add(this.ctrlProfiler);
|
||||
this.tpgProfiler.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpgProfiler.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tpgProfiler.Name = "tpgProfiler";
|
||||
this.tpgProfiler.Size = new System.Drawing.Size(606, 343);
|
||||
this.tpgProfiler.TabIndex = 2;
|
||||
this.tpgProfiler.Text = "Profiler";
|
||||
this.tpgProfiler.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlProfiler
|
||||
//
|
||||
this.ctrlProfiler.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlProfiler.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlProfiler.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ctrlProfiler.Name = "ctrlProfiler";
|
||||
this.ctrlProfiler.Size = new System.Drawing.Size(606, 343);
|
||||
this.ctrlProfiler.TabIndex = 0;
|
||||
//
|
||||
// mnuHighlightCurrentRowColumn
|
||||
//
|
||||
this.mnuHighlightCurrentRowColumn.CheckOnClick = true;
|
||||
this.mnuHighlightCurrentRowColumn.Name = "mnuHighlightCurrentRowColumn";
|
||||
this.mnuHighlightCurrentRowColumn.Size = new System.Drawing.Size(256, 22);
|
||||
this.mnuHighlightCurrentRowColumn.Text = "Highlight current row/column";
|
||||
this.mnuHighlightCurrentRowColumn.CheckedChanged += new System.EventHandler(this.mnuHighlightCurrentRowColumn_CheckedChanged);
|
||||
//
|
||||
// frmMemoryViewer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -828,7 +804,6 @@
|
|||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.tpgAccessCounters.ResumeLayout(false);
|
||||
this.tpgProfiler.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -863,8 +838,6 @@
|
|||
private System.Windows.Forms.TabPage tpgMemoryViewer;
|
||||
private System.Windows.Forms.TabPage tpgAccessCounters;
|
||||
private Controls.ctrlMemoryAccessCounters ctrlMemoryAccessCounters;
|
||||
private System.Windows.Forms.TabPage tpgProfiler;
|
||||
private Controls.ctrlProfiler ctrlProfiler;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuLoadTblFile;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuShowCharacters;
|
||||
|
|
|
@ -280,10 +280,6 @@ namespace Mesen.GUI.Debugger
|
|||
case RefreshSpeed.High: refreshDelay = 16; break;
|
||||
}
|
||||
|
||||
if(_selectedTab == tpgProfiler) {
|
||||
refreshDelay *= 10;
|
||||
}
|
||||
|
||||
DateTime now = DateTime.Now;
|
||||
if(!_updating && ConfigManager.Config.DebugInfo.RamAutoRefresh && (now - _lastUpdate).Milliseconds >= refreshDelay) {
|
||||
_lastUpdate = now;
|
||||
|
@ -381,8 +377,6 @@ namespace Mesen.GUI.Debugger
|
|||
} else if(this.tabMain.SelectedTab == this.tpgMemoryViewer) {
|
||||
this.UpdateByteColorProvider();
|
||||
this.ctrlHexViewer.RefreshData(_memoryType);
|
||||
} else if(this.tabMain.SelectedTab == this.tpgProfiler) {
|
||||
this.ctrlProfiler.RefreshData();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
66
GUI.NET/Debugger/frmProfiler.Designer.cs
generated
Normal file
66
GUI.NET/Debugger/frmProfiler.Designer.cs
generated
Normal file
|
@ -0,0 +1,66 @@
|
|||
namespace Mesen.GUI.Debugger
|
||||
{
|
||||
partial class frmProfiler
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.ctrlProfiler = new Mesen.GUI.Debugger.Controls.ctrlProfiler();
|
||||
this.tmrRefresh = new System.Windows.Forms.Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ctrlProfiler
|
||||
//
|
||||
this.ctrlProfiler.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlProfiler.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlProfiler.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ctrlProfiler.Name = "ctrlProfiler";
|
||||
this.ctrlProfiler.Size = new System.Drawing.Size(665, 385);
|
||||
this.ctrlProfiler.TabIndex = 1;
|
||||
//
|
||||
// tmrRefresh
|
||||
//
|
||||
this.tmrRefresh.Interval = 1000;
|
||||
this.tmrRefresh.Tick += new System.EventHandler(this.tmrRefresh_Tick);
|
||||
//
|
||||
// frmProfiler
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(665, 385);
|
||||
this.Controls.Add(this.ctrlProfiler);
|
||||
this.Name = "frmProfiler";
|
||||
this.Text = "Performance Profiler";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Controls.ctrlProfiler ctrlProfiler;
|
||||
private System.Windows.Forms.Timer tmrRefresh;
|
||||
}
|
||||
}
|
49
GUI.NET/Debugger/frmProfiler.cs
Normal file
49
GUI.NET/Debugger/frmProfiler.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using Mesen.GUI.Config;
|
||||
using Mesen.GUI.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Mesen.GUI.Debugger
|
||||
{
|
||||
public partial class frmProfiler : BaseForm
|
||||
{
|
||||
public frmProfiler()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if(!DesignMode) {
|
||||
DebugWorkspaceManager.AutoLoadDbgFiles(true);
|
||||
|
||||
ctrlProfiler.RefreshData();
|
||||
tmrRefresh.Start();
|
||||
|
||||
if(!ConfigManager.Config.DebugInfo.ProfilerSize.IsEmpty) {
|
||||
this.StartPosition = FormStartPosition.Manual;
|
||||
this.Size = ConfigManager.Config.DebugInfo.ProfilerSize;
|
||||
this.Location = ConfigManager.Config.DebugInfo.ProfilerLocation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||
{
|
||||
base.OnFormClosing(e);
|
||||
|
||||
ConfigManager.Config.DebugInfo.ProfilerSize = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Size : this.Size;
|
||||
ConfigManager.Config.DebugInfo.ProfilerLocation = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Location : this.Location;
|
||||
ConfigManager.ApplyChanges();
|
||||
}
|
||||
|
||||
private void tmrRefresh_Tick(object sender, EventArgs e)
|
||||
{
|
||||
ctrlProfiler.RefreshData();
|
||||
}
|
||||
}
|
||||
}
|
126
GUI.NET/Debugger/frmProfiler.resx
Normal file
126
GUI.NET/Debugger/frmProfiler.resx
Normal file
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>107, 17</value>
|
||||
</metadata>
|
||||
</root>
|
11
GUI.NET/Forms/frmMain.Designer.cs
generated
11
GUI.NET/Forms/frmMain.Designer.cs
generated
|
@ -220,6 +220,7 @@ namespace Mesen.GUI.Forms
|
|||
this.mnuReportBug = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuProfiler = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panelRenderer.SuspendLayout();
|
||||
this.panelInfo.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picIcon)).BeginInit();
|
||||
|
@ -1542,6 +1543,7 @@ namespace Mesen.GUI.Forms
|
|||
this.mnuDebugDebugger,
|
||||
this.mnuEventViewer,
|
||||
this.mnuMemoryViewer,
|
||||
this.mnuProfiler,
|
||||
this.mnuPpuViewer,
|
||||
this.mnuScriptWindow,
|
||||
this.mnuTextHooker,
|
||||
|
@ -1773,6 +1775,14 @@ namespace Mesen.GUI.Forms
|
|||
this.mnuAbout.Text = "About";
|
||||
this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click);
|
||||
//
|
||||
// mnuProfiler
|
||||
//
|
||||
this.mnuProfiler.Image = global::Mesen.GUI.Properties.Resources.Speed;
|
||||
this.mnuProfiler.Name = "mnuProfiler";
|
||||
this.mnuProfiler.Size = new System.Drawing.Size(258, 22);
|
||||
this.mnuProfiler.Text = "Performance Profiler";
|
||||
this.mnuProfiler.Click += new System.EventHandler(this.mnuProfiler_Click);
|
||||
//
|
||||
// frmMain
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
|
@ -1991,6 +2001,7 @@ namespace Mesen.GUI.Forms
|
|||
private System.Windows.Forms.ToolStripMenuItem mnuOpenSpriteViewer;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuOpenPaletteViewer;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem28;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuProfiler;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -403,6 +403,11 @@ namespace Mesen.GUI.Forms
|
|||
DebugWindowManager.OpenDebugWindow(DebugWindow.TextHooker);
|
||||
}
|
||||
|
||||
private void mnuProfiler_Click(object sender, EventArgs e)
|
||||
{
|
||||
DebugWindowManager.OpenDebugWindow(DebugWindow.Profiler);
|
||||
}
|
||||
|
||||
private void mnuOpenNametableViewer_Click(object sender, EventArgs e)
|
||||
{
|
||||
DebugWindowManager.OpenPpuViewer(PpuViewerMode.NametableViewer);
|
||||
|
|
|
@ -827,6 +827,7 @@ namespace Mesen.GUI.Forms
|
|||
mnuScriptWindow.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenScriptWindow));
|
||||
mnuTraceLogger.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenTraceLogger));
|
||||
mnuTextHooker.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenTextHooker));
|
||||
mnuProfiler.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenProfiler));
|
||||
|
||||
mnuOpenNametableViewer.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenNametableViewer));
|
||||
mnuOpenChrViewer.InitShortcut(this, nameof(DebuggerShortcutsConfig.OpenChrViewer));
|
||||
|
@ -1168,6 +1169,7 @@ namespace Mesen.GUI.Forms
|
|||
mnuScriptWindow.Enabled = running;
|
||||
mnuTextHooker.Enabled = running;
|
||||
mnuTraceLogger.Enabled = running;
|
||||
mnuProfiler.Enabled = running;
|
||||
|
||||
mnuPpuViewerCompact.Enabled = running;
|
||||
mnuOpenNametableViewer.Enabled = running;
|
||||
|
|
|
@ -673,6 +673,12 @@
|
|||
<Compile Include="Debugger\frmGoToAll.Designer.cs">
|
||||
<DependentUpon>frmGoToAll.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Debugger\frmProfiler.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Debugger\frmProfiler.Designer.cs">
|
||||
<DependentUpon>frmProfiler.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Debugger\frmSetScriptTimeout.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -1374,6 +1380,9 @@
|
|||
<EmbeddedResource Include="Debugger\frmGoToAll.resx">
|
||||
<DependentUpon>frmGoToAll.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Debugger\frmProfiler.resx">
|
||||
<DependentUpon>frmProfiler.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Debugger\frmSetScriptTimeout.resx">
|
||||
<DependentUpon>frmSetScriptTimeout.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Add table
Reference in a new issue