public function traceFunction($name, $deep = false, $showInternals = false)
    {
        if (\is_array($name)) {
            $name1 = \implode('::', $name);
            $name2 = \implode('->', $name);
        } else {
            $name1 = $name2 = (string) $name;
        }

        $cb = function (\stdClass $record, $isEntry) use ($name1, $name2, $deep, $showInternals) {
            static $cnt = 0;

            if ($record->function === $name1 || $record->function === $name2) {
                $cnt += $isEntry ? 1 : -1;

                return null;
            }

            return ($deep && $cnt && ($showInternals || !$record->isInternal)) ? null : self::SKIP;
        };

        $this->setFilterCallback($cb, self::FILTER_BOTH);
    }