|
From: Sarah W. <sar...@ya...> - 2009-04-05 19:43:22
|
Hi
How to use valgrind to track control dependency ?
For example, in the following code:
f(n) {
1: if (n>0) {
2: s1
3: s2
4: }
5: s3
}
How can I know line 2 and 3 are control dependent on line 1 in Valgrind ?
|
|
From: Nicholas N. <n.n...@gm...> - 2009-04-06 03:15:21
|
On Sun, Apr 5, 2009 at 2:43 PM, Sarah Wang <sar...@ya...> wrote:
>
> How to use valgrind to track control dependency ?
>
> For example, in the following code:
>
> f(n) {
> 1: if (n>0) {
> 2: s1
> 3: s2
> 4: }
> 5: s3
> }
>
> How can I know line 2 and 3 are control dependent on line 1 in Valgrind ?
It's difficult to determine that from the machine code when
instrumenting one small block of code at a time (as Valgrind does).
Valgrind is better for tracking data dependencies, which are more
obvious.
Nick
|