Debugging the PRM

This document describes how to debug the PRM using internal macros.

Purpose

Use the provided KTrace and BTrace macros to debug your PRM implementation.

Introduction

These kernel services allow you to generate and capture trace information in a manner designed to minimise the impact on a running system.

Using KTrace

Use the KTRACE macro with KRESMANAGER for debug print messages in the code.

__KTRACE_OPT(KRESMANAGER,Kern::Printf(">DH4PowerResourceController::DoInitController\n”))

Using the kernel trace tool

The BTRACE category, TCategory::EResourceManager, and a number of sub categories are defined and used to trace the progress of all operations on the PRM. All tracing sub categories are wrapped with a macro definition. Implement macro definitions in e32\include\drivers\rescontrol_trace.h to replace BTrace with other tracing methods.