Improve ProfilerXhprof's blacklist/whitelist capabilities
authorOri Livneh <ori@wikimedia.org>
Thu, 21 May 2015 18:36:51 +0000 (11:36 -0700)
committerOri Livneh <ori@wikimedia.org>
Thu, 21 May 2015 19:09:12 +0000 (12:09 -0700)
commit661830710244313bb5022e37723c43589b007533
tree97ab6f800ad895ee4a18a14fbe5e5ccb019471a0
parentd2033dac0d9e9a88106161eaa7339c77ea5b0888
Improve ProfilerXhprof's blacklist/whitelist capabilities

* Apply the blacklist / whitelist to profiled sections, not just function names.
* Allow shell-style wildcard patterns in blacklist / whitelist.
* Prefix all profiled section names with 'section.', to distinguish them from
  functions.

Note that shell-style wildcard patterns are not supported by xhprof natively,
but it won't barf on them either, nor will they match against actual function
names (since shell wildcard characters are not valid for PHP function names),
and the filtering will still be enforced in ProfilerXhprof.

This has the side-effect of working around https://github.com/facebook/hhvm/issues/4385

Bug: T99829
Change-Id: I8354ed922fa7b42857eda03be8f62b89ac78d0d6
includes/profiler/ProfilerXhprof.php