0

I am learning DTrace, and it is very powerful tool. But one problem is that DTrace outputs too much information and most of those are NS classes.

But my question is how I can filter system classes if users' classes do not have proper prefix?

(There was a similar Stack Overflow question for this topic, [How to detect without the system method or system framework with DTrace on Mac OS X?].)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131

1 Answers1

0

DTrace uses Filename generation-like syntax to specify probe names. E.g. you could specify first characters of a class name by using brackets [ and ].

E.g. if you want to filter all NS* classes:

objc$target::[ABCDEFGHIJKLMOPQRSTUVWXYZ]*:entry (N is removed)
objc$target::N[ABCDEFGHIJKLMNOPQRTUVWXYZ]*:entry (S is removed)

But you have to repeat it for each prefix Apple uses, like CA, IK etc.

Kentzo
  • 3,881
  • 29
  • 54