diff options
author | Thays Grazia <thaystg@gmail.com> | 2019-01-07 22:13:10 +0300 |
---|---|---|
committer | Thays Grazia <thaystg@gmail.com> | 2019-01-07 22:13:10 +0300 |
commit | 0d59153be7be6015e5ec97976adeb30a42257bb1 (patch) | |
tree | c3d859f9ead0ca9f904d184ac89783625b199515 /Mono.Debugger.Soft | |
parent | 6fdcde8355fd6497fb741145bbd740115b2493a1 (diff) |
[Debugger] Record time it took between steps.
I implemented a new message to avoid breaking the protocol. I used the MonoStopwatch to count the time between the steps, it was already used in the debugger-agent.
Fixes #8460
Diffstat (limited to 'Mono.Debugger.Soft')
-rw-r--r-- | Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs | 7 | ||||
-rw-r--r-- | Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index c9da1c7..57f10e4 100644 --- a/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -507,7 +507,8 @@ namespace Mono.Debugger.Soft GET_ID = 5, /* Ditto */ GET_TID = 6, - SET_IP = 7 + SET_IP = 7, + GET_ELAPSED_TIME = 8 } enum CmdEventRequest { @@ -2041,7 +2042,9 @@ namespace Mono.Debugger.Soft internal string Thread_GetName (long id) { return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_NAME, new PacketWriter ().WriteId (id)).ReadString (); } - + internal long Thread_GetElapsedTime (long id) { + return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_ELAPSED_TIME, new PacketWriter ().WriteId (id)).ReadLong (); + } internal void Thread_GetFrameInfo (long id, int start_frame, int length, Action<FrameInfo[]> resultCallaback) { Send (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length), (res) => { int count = res.ReadInt (); diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs index 938a4ca..9f20534 100644 --- a/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs +++ b/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs @@ -30,11 +30,18 @@ namespace Mono.Debugger.Soft return frames; } + public long ElapsedTime () { + long elapsedTime = GetElapsedTime (); + return elapsedTime; + } + internal void InvalidateFrames () { cacheInvalid = true; threadStateInvalid = true; } - + internal long GetElapsedTime () { + return vm.conn.Thread_GetElapsedTime (id); + } internal void FetchFrames (bool mustFetch = false) { lock (fetchingLocker) { if (fetching || !cacheInvalid) |