Kernel Trace Tool Overview

The kernel trace tool is a user-side client DLL which provides an interface for extracting trace data from a memory buffer

Purpose

. Kernel Trace tool is part of the reference implementation of trace handling and is also used by the btrace.exe command line interface.

Intended audience

This document is intended to be used by platform developers and device creators.

It is for use by developers implementing a trace service using the kernel trace tool framework and for developers implementing a custom trace tool using the output of the kernel trace tool client.

Kernel Trace Tool Variant Device Driver Library Details

The DLL that provides the functionality and the library to which your code must link is identified below.

DLL LIB Short Description

btracec.dll

btracec.lib

An interface for extracting trace data from a memory buffer.

Architectural relationship

The kernel trace tool uses the output of the kernel side module btracex.ldd and the trace filters defined in EUser. It provides input to the command line kernel trace tool.

Description

The kernel trace tool is a user side interface to the kernel side trace module. It is not used in isolation. It is used by the BTrace.exe command line trace tool. The licensee may create their own trace tool using this library.

Kernel Trace tool variant device driver functionality

The kernel trace tool module provides functionality to:

  • open and close a communication channel to kernel side,

  • open and close the chunk from which it reads data,

  • get and set the size of the buffer to which it writes,

  • discard buffer data,

  • get and set the trace mode,

  • get and set the trace filters,

  • get data from the chunk,

  • remove data from the buffer,

  • request notification that data is available, and

  • cancel a notification request.

Key Kernel Trace tool variant device driver classes

The key classes that make up the kernel trace tool module are as follows:

  • RBTrace

    A class providing functions to read trace data from kernel side chunks and write it to a buffer. For example the command line kernel trace tool declares an RBTrace object and calls its functions.

  • TBTraceBuffer

    A class which encapsulates the buffer to which trace data is written.

Using Kernel Trace tool variant device driver

The use of the kernel trace tool API is covered in the Kernel Trace Tool Tutorial