FD kernel tracing: Capture kernel-only stack traces
* When exec()'ing we'd otherwise get (harmless but annoying) messages from vm_page_fault(). With syscall tracing enabled we can get userland stack traces anyway. * Simplify by using TRACE_ENTRY_SELECTOR().
This commit is contained in:
parent
0a4cbd786c
commit
00b42dde0d
@ -20,32 +20,20 @@
|
||||
namespace FileDescriptorTracing {
|
||||
|
||||
|
||||
class FDTraceEntry : public AbstractTraceEntry {
|
||||
class FDTraceEntry
|
||||
: public TRACE_ENTRY_SELECTOR(FILE_DESCRIPTOR_TRACING_STACK_TRACE) {
|
||||
public:
|
||||
FDTraceEntry(file_descriptor* descriptor)
|
||||
:
|
||||
TraceEntryBase(FILE_DESCRIPTOR_TRACING_STACK_TRACE, 0, true),
|
||||
fDescriptor(descriptor),
|
||||
fReferenceCount(descriptor->ref_count)
|
||||
{
|
||||
#if FILE_DESCRIPTOR_TRACING_STACK_TRACE
|
||||
fStackTrace = capture_tracing_stack_trace(
|
||||
FILE_DESCRIPTOR_TRACING_STACK_TRACE, 0, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if FILE_DESCRIPTOR_TRACING_STACK_TRACE
|
||||
virtual void DumpStackTrace(TraceOutput& out)
|
||||
{
|
||||
out.PrintStackTrace(fStackTrace);
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
file_descriptor* fDescriptor;
|
||||
int32 fReferenceCount;
|
||||
#if FILE_DESCRIPTOR_TRACING_STACK_TRACE
|
||||
tracing_stack_trace* fStackTrace;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user