search for: count_list

Displaying 1 result from an estimated 1 matches for "count_list".

Did you mean: count_limit
2011 Aug 19
4
Using dtrace to follow a kernel linked list
...ed list. For example: struct list { struct list *next; void *data; }; struct list *list_root; Assuming I had "list_root" available, but I wanted to know how long the linked list is, how can I do this in a dtrace probe? If I had looping constructs, it would be obvious: int count_list(struct list *list) { int i; for (i = 0; list != NULL; list = list->next) ++i; return i; } In the dtrace scripting language there are no loop constructs, but is there a way to add a new provider than can loop? Thank you, Lida Horn