30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 236: Stopped<br />

Execution of Compiled<br />

Expressions<br />

Defining Eval Points and Conditional Breakpoints<br />

If the expression executes a $stop function, <strong>TotalView</strong> stops executing the<br />

compiled expression. At this time, you can single-step through it and continue<br />

executing the expression as you would the rest of your code.<br />

If you plan to use many compiled expressions or your expressions are long,<br />

you may need to think about allocating patch space.<br />

Allocating Patch Space for Compiled Expressions<br />

Compiled<br />

expression<br />

gets its own<br />

stack frame<br />

Compiled<br />

expression in<br />

Source Pane<br />

<strong>TotalView</strong> must either allocate or find space in your program to hold the<br />

code that it generates for compiled expressions. Since this patch space is<br />

part of your program’s address space, the location, size, and allocation<br />

scheme that <strong>TotalView</strong> uses might conflict with your program. As a result,<br />

you may need to change how <strong>TotalView</strong> allocates this space.<br />

You can choose one of the following patch space allocation schemes:<br />

� Dynamic patch space allocation: Tells <strong>TotalView</strong> to dynamically find<br />

the space for your expression’s code.<br />

� Static patch space allocation: Tells <strong>TotalView</strong> to use a statically allocated<br />

area of memory.<br />

Allocating Dynamic Patch Space<br />

Dynamic patch space allocation means that <strong>TotalView</strong> dynamically allocates<br />

patch space for code fragments. If you do not specify the size and location<br />

for this space, <strong>TotalView</strong> allocates 1 MB. <strong>TotalView</strong> creates this space using<br />

system calls.<br />

<strong>TotalView</strong> allocates memory for read, write, and execute access in the<br />

addresses shown in the following table:<br />

<strong>TotalView</strong> <strong>Users</strong> <strong>Guide</strong>: version 8.7 371

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!