ETW test

Created a test php page which simply sleeps for a specified seconds, and called it from Windows with ETW turned on.

On Mac: test.php

<?php
$delay = $_GET["delay"];
sleep($delay);
echo date('h:i:s') . "<br/>\n";
?>

On Windows:

start:
xperf.exe -on PROC_THREAD+LOADER+Base+CSWITCH+DISPATCHER -stackwalk Profile+CSwitch+ReadyThread

run the test:
Open Powershell Window and run -
 $wc = New-Object System.Net.WebClient
 $wc.DownloadString("http://hogeaddress:hogeport/hogedirectory/test.php?delay=5")

stop:
xperf.exe -stop -d %temp%\hoge.etl

see the trace:
xperf.exe %temp%\hoge.etl

It traced in kernel mode when the user mode thread waited on the sync object.
ETW

Leave a Reply

Your email address will not be published. Required fields are marked *