Example 64 Detecting potential performance improvement opportunities

bash-2.05b$ cat /tmp/example.c

struct X{ int i;

int arr[100]; } x;

int foo( struct X);

int main() {

foo (x); //line 16

}

$ cadvise +wperfadvice aCC -c /example.c

"/example.c", line 16: warning #4319-D: performance advice: passing a

large (404 bytes) parameter by value is inefficient, consider passing by reference

foo (x);

^

8.7 Detecting potential performance improvement opportunities

55

Page 55
Image 55
HP UX Web Development Tools manual Detecting potential performance improvement opportunities