Browse Prior Art Database

Method and System for Dynamically Enabling and Disabling Trace Points Disclosure Number: IPCOM000198647D
Publication Date: 2010-Aug-11
Document File: 3 page(s) / 22K

Publishing Venue

The Prior Art Database


A method and system for dynamically enabling and disabling trace points is disclosed.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 3

Method and System for Dynamically Enabling and Disabling Trace Points

Disclosed is a method and system for dynamically enabling and disabling trace points. The method and system disclosed herein uses a table that contains entries for the

maximum number of concurrently active trace points in a system. When a trace point is

to be created in the system, an entry corresponding to the trace point is created in the

table. Each trace point is identified using a unique identifier called a trace point ID.

Further, the table contains pointers to a byte code that represents the actions that are to

be executed when a trace point is encountered during execution. Additionally, a pointer

corresponding to a return location to which execution should return to after executing

the actions is also specified in the table.

The method and system disclosed herein involves enabling the trace points by

allocating a low memory address for dynamic tracing. For example, if it is required to

support 16K (16384) active trace points concurrently, a 512K memory region is split into

16384 sub regions of 32 bytes each.

The sub regions are set up using the following code.
0x8000040: li r11, 0x0003
ba tmgr
0x8000048: mtctr r11
0x800005C: NOP
Initially, a value of 3 is loaded into general purpose register r11 at a sub region

initialized from the address 0x08000040. The value 3 corresponds to a trace point ID.

Thereafter an absolute branch to a dynamic trace manager (tmgr) is added. Since the

dynamic trace manager is in the kernel which is loaded in low memory under 32MB, a

'ba' or branch absolute is always possible from any location of the 512K memory.

Subsequently, the trace point ID from the general purpose register is moved to a count

register (CTR). Subsequent to moving the trace point ID to the CTR register, a place

holder for instructions is inserted regarding actions to be performed when the trace point


Page 2 of 3

is encountered. Thereafter, a branch is created to the address in the CTR register.

Further, at the eighth instruction, the end point for the first memory sub region is

specified. Thereafter, another trace point may be initialized to another memory sub


Subsequent to loading the trace point IDs into the table, a trace point is loade...