StackWalker::walk creates one StackFrame per frame and the current implementation allocates one StackFrameInfo and one MemberName objects per frame. Some frameworks like logging may only interest in the Class object but not the method name nor the BCI. For example, java.util.logging filters out its implementation classes to find the caller class to log in the LogRecrod. It's something similar to `StackWalker::getCallerClass` but allows a predicate to filter out the element. In this case, only the buffer to hold the classes on the stack is allocated.