Convert Figma logo to code with AI

google logoUIforETW

User interface for recording and managing ETW traces

1,619
208
1,619
39

Top Related Projects

PerfView is a CPU and memory performance-analysis tool

4,269

C/C++ Performance Profiler

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.

8,314

pprof is a tool for visualization and analysis of profiling data

Stack trace visualizer

5,524

Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.

Quick Overview

UIforETW (User Interface for Event Tracing for Windows) is an open-source project by Google that provides a graphical user interface for capturing and analyzing ETW (Event Tracing for Windows) traces. It simplifies the process of recording system events and performance data on Windows, making it easier for developers and system administrators to diagnose and optimize performance issues.

Pros

  • User-friendly interface for capturing and analyzing ETW traces
  • Integrates with Windows Performance Analyzer (WPA) for in-depth analysis
  • Supports custom providers and flexible trace configuration
  • Regularly updated and maintained by Google

Cons

  • Limited to Windows operating systems
  • Requires some knowledge of ETW concepts and trace analysis
  • May have a learning curve for users new to performance profiling
  • Large trace files can be resource-intensive to analyze

Getting Started

To get started with UIforETW:

  1. Download the latest release from the GitHub releases page.
  2. Install the application by running the downloaded executable.
  3. Launch UIforETW.
  4. Click the "Start Tracing" button to begin capturing ETW events.
  5. Perform the actions you want to analyze on your system.
  6. Click "Stop Tracing" to end the capture.
  7. The trace file will be saved, and you can open it in Windows Performance Analyzer (WPA) for detailed analysis.

For more detailed instructions and advanced usage, refer to the documentation in the GitHub repository.

Competitor Comparisons

PerfView is a CPU and memory performance-analysis tool

Pros of PerfView

  • More comprehensive analysis tools for performance data
  • Supports a wider range of data sources and file formats
  • Actively maintained by Microsoft with frequent updates

Cons of PerfView

  • Steeper learning curve due to more complex interface
  • Larger application size and resource requirements
  • Primarily focused on Windows performance analysis

Code Comparison

PerfView:

public void OnTraceLoaded()
{
    var eventSource = new ETWTraceEventSource(fileName);
    var clrParser = new ClrTraceEventParser(eventSource);
    clrParser.AllKeywords(delegate (GCStartTraceData data)
    {
        // Process GC start event
    });
}

UIforETW:

void CUIforETWDlg::OnBnClickedStarttracing()
{
    const auto traceDir = GetTraceDir();
    const auto traceName = GenerateTraceName();
    const auto fullPath = traceDir + traceName;
    StartTracingToFile(fullPath);
}

Summary

PerfView offers more advanced analysis capabilities and supports a broader range of data sources, making it suitable for in-depth performance investigations. However, it has a steeper learning curve and is primarily focused on Windows. UIforETW provides a simpler interface for ETW tracing but with more limited analysis tools. The code comparison shows PerfView's C# implementation for processing trace events, while UIforETW uses C++ for managing trace sessions.

4,269

C/C++ Performance Profiler

Pros of Orbit

  • More comprehensive profiling capabilities, including CPU, GPU, and memory profiling
  • Cross-platform support (Windows, Linux)
  • Modern, user-friendly interface with real-time data visualization

Cons of Orbit

  • Larger project size and complexity, potentially harder to set up and use for simple tasks
  • Steeper learning curve due to more advanced features
  • May have higher system requirements for optimal performance

Code Comparison

UIforETW (C++):

void CUIforETW::OnTimer(UINT_PTR nIDEvent)
{
    if (nIDEvent == kTimerID)
    {
        UpdateTraceStatus();
    }
}

Orbit (C++):

void OrbitApp::OnTimer() {
  if (capture_window_ != nullptr) {
    capture_window_->UpdateCapture();
  }
  main_window_->RefreshDataView();
}

Both projects use timer-based updates, but Orbit's implementation appears more modular and object-oriented, reflecting its more complex architecture.

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.

Pros of Windows-driver-samples

  • Comprehensive collection of driver samples for various Windows devices and technologies
  • Official Microsoft repository, ensuring high-quality and up-to-date examples
  • Covers a wide range of driver types, including KMDF, UMDF, and WDM

Cons of Windows-driver-samples

  • Large repository size, which may be overwhelming for beginners
  • Focuses solely on driver development, limiting its usefulness for other Windows programming tasks
  • May require more setup and specialized knowledge to run and test samples

Code Comparison

Windows-driver-samples (KMDF driver example):

NTSTATUS
EvtDeviceAdd(
    _In_    WDFDRIVER       Driver,
    _Inout_ PWDFDEVICE_INIT DeviceInit
    )
{
    NTSTATUS status;
    WDF_OBJECT_ATTRIBUTES deviceAttributes;
    WDFDEVICE device;
    PDEVICE_CONTEXT deviceContext;

UIforETW (ETW tracing example):

void CUIforETWDlg::OnBnClickedStarttracing()
{
    if (bIsTracing)
        return;
    std::wstring traceFilename = GetTraceLogFilename();
    std::wstring kernelFilename = traceFilename + L".kernel.etl";
    std::wstring userFilename = traceFilename + L".user.etl";
8,314

pprof is a tool for visualization and analysis of profiling data

Pros of pprof

  • Language-agnostic profiling tool, supporting multiple programming languages
  • Provides both command-line and web-based interfaces for profile analysis
  • Offers various visualization options, including flame graphs and call graphs

Cons of pprof

  • Requires integration with the application code for data collection
  • May have a steeper learning curve for users unfamiliar with profiling concepts
  • Limited support for real-time profiling and continuous monitoring

Code Comparison

pprof:

import "net/http/pprof"

func main() {
    go func() {
        log.Println(http.ListenAndServe("localhost:6060", nil))
    }()
    // Rest of the application code
}

UIforETW:

#include "etwprof.h"

int main() {
    ETWProfiler profiler;
    profiler.StartProfiling();
    // Application code to be profiled
    profiler.StopProfiling();
    return 0;
}

UIforETW is specifically designed for Windows Event Tracing, offering a user-friendly interface for ETW profiling. It excels in capturing system-wide performance data and provides seamless integration with Windows performance tools. However, it's limited to Windows environments and may require more setup compared to pprof's cross-platform approach.

Stack trace visualizer

Pros of FlameGraph

  • Language-agnostic and can be used with various profiling tools
  • Generates interactive SVG flame graphs for easy visualization
  • Lightweight and easy to integrate into existing workflows

Cons of FlameGraph

  • Requires additional steps to generate input data for visualization
  • Less user-friendly for those unfamiliar with command-line tools
  • Limited built-in analysis features compared to UIforETW

Code Comparison

FlameGraph:

#!/usr/bin/perl -w
use strict;

my %collapsed;
while (<>) {
    chomp;
    my ($stack, $samples) = split /\s+/;
    $collapsed{$stack} += $samples;
}

UIforETW:

void CTraceController::StartTracing()
{
    std::wstring command = L"start " + GetFullTracingFilename();
    int result = _wsystem(command.c_str());
    if (result != 0)
        AfxMessageBox(L"Failed to start tracing.");
}

Summary

FlameGraph is a versatile tool for generating flame graphs from various profiling data sources, while UIforETW is specifically designed for Windows ETW (Event Tracing for Windows) analysis. FlameGraph offers broader compatibility and easier integration, but UIforETW provides a more comprehensive Windows-specific profiling solution with a graphical interface.

5,524

Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.

Pros of Detours

  • More versatile, supporting a wide range of API hooking scenarios
  • Actively maintained by Microsoft with regular updates
  • Extensive documentation and examples available

Cons of Detours

  • Steeper learning curve due to its complexity
  • Requires more setup and configuration compared to UIforETW
  • May introduce overhead in certain scenarios

Code Comparison

UIforETW (simplified ETW tracing):

ULONG status = StartTraceW(&g_traceHandle, KERNEL_LOGGER_NAME, &properties);
if (status != ERROR_SUCCESS)
    return false;

Detours (function hooking):

LONG error = DetourTransactionBegin();
error = DetourUpdateThread(GetCurrentThread());
error = DetourAttach(&(PVOID&)TrueCreateFileW, MyCreateFileW);
error = DetourTransactionCommit();

UIforETW focuses on ETW tracing, while Detours provides a framework for intercepting and modifying function calls. UIforETW is more specialized for performance analysis, whereas Detours offers broader application in various scenarios, including debugging, security, and application customization.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

UIforETW is a user interface for recording ETW (Event Tracing for Windows) traces, which allow amazingly deep investigations of performance problems on Windows. Its goals include:

  • making recording ETW traces easy for non-developers
  • making it easy to record additional contextual data such as user input and CPU temperature in order to make trace analysis easier
  • making trace management easier for developers
  • working around bugs in WPT (Windows Performance Toolkit)

Tutorials on how to use ETW to investigate performance problems on Windows can be found here: https://tinyurl.com/etwcentral

For specific details on this project see this post which includes some documentation and an explanation for why this project was created: https://randomascii.wordpress.com/2015/04/14/uiforetw-windows-performance-made-easier/

UIforETW makes it much easier to control how traces are recorded than using batch files or Microsoft's wprui. UIforETW also works around numerous problems with ETW tracing (fixing symbol loading issues) and adds extra features such as categorizing chrome processes, monitoring working sets, etc.

UIforETW also lists all the recorded traces and displays editable notes associated with each one.

UIforETW has some features that are specific to Chrome developers - but it is fully functional for non-Chrome developers as well.

When adding TraceLogging and EventSource providers, UIforETW supports the same *Name naming convention as other ETW tools. See https://blogs.msdn.microsoft.com/dcook/2015/09/08/etw-provider-names-and-guids/ to ensure that your provider name and GUID conform to the convention. EventSource providers should automatically match.

If you want to use UIforETW then you should download the latest etwpackage.zip from the releases page at: https://github.com/google/UIforETW/releases

If you want to build or modify UIforETW then you should clone the repo from https://github.com/google/UIforETW.git and then build UIforETW\UIforETW.sln.

Pull requests are welcomed. For information on contributing see the CONTRIBUTING file. When writing commit messages try following the general guidelines from here: http://chris.beams.io/posts/git-commit/ Small pull requests are preferred - it's better to do several small pull requests, each with a unifying theme - than to do one huge pull request.

This is not an official Google project and is not supported by Google in any way.