Created
July 26, 2019 06:47
-
-
Save jdu2600/a0898230dcb212c5e670a4d6fc0c4ad7 to your computer and use it in GitHub Desktop.
ETW SysCallAddress and ProcessorNumber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.Diagnostics.Tracing.Session; | |
using Microsoft.Diagnostics.Tracing.Parsers.Kernel; | |
using Microsoft.Diagnostics.Tracing.Parsers; | |
namespace SysCallAddress | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var session = new TraceEventSession("SysCallAddress"); | |
session.EnableKernelProvider(KernelTraceEventParser.Keywords.SystemCall); | |
session.Source.Kernel.PerfInfoSysClEnter += delegate (SysCallEnterTraceData data) | |
{ | |
Console.WriteLine("ProcessorNumber:{0} SysCallAddress:0x{1:X}", data.ProcessorNumber, data.SysCallAddress); | |
}; | |
session.Source.Process(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment