On 10/13/10 21:31, Jiri Olsa wrote:
it's nice to see someone is actually using this ;) thanks
Well, i just found it, and it looks like it does exactly what i was looking for -- thanks for writing it. :)
One thing that i found surprising is that the symbol matching works on substrings. So "latrace -Ap -s read ..." prints not only the read calls, but also all the pthread_* calls etc and there is no way to make the filtering more specific.
What i did was:
--- a/src/audit.c +++ b/src/audit.c @@ -47,7 +47,8 @@ static int check_names(char *name, char **ptr) char *n;
for(n = *ptr; n; n = *(++ptr)) { - if (strstr(name, n)) { + if ((n[0]=='*' && strstr(name, n+1)) + || strcmp(name, n)==0) { PRINT_VERBOSE(&cfg, 2, "return %d for name %s\n", 1, name); return 1;
which lets me choose the exact match (so "-n _setjmp" is required to avoid the crash), or the old behavior by prefixing the symbol name w/ '*' (so "-s *read" shows both the read calls and anything else that contains that word, like pthread functions). I'm not sure if '*' is the best prefix, and if such a change would be ok for all the other check_names callers.
artur