blob: 89c8153e2c152fae60a16d544404c50b12af86db [file] [log] [blame]
Teng Qin873e9392019-03-07 21:56:10 -08001/*
2 * Copyright (c) Facebook, Inc.
3 * Licensed under the Apache License, Version 2.0 (the "License")
4 */
5
6#pragma once
7
8#include "PyPerfSampleProcessor.h"
9
10namespace ebpf {
11namespace pyperf {
12
13class PyPerfDefaultPrinter : public PyPerfSampleProcessor {
14 public:
15 PyPerfDefaultPrinter(bool showGILState, bool showThreadState,
16 bool showPthreadIDState)
17 : showGILState_(showGILState),
18 showThreadState_(showThreadState),
19 showPthreadIDState_(showPthreadIDState) {}
20
21 void processSamples(const std::vector<PyPerfSample>& samples,
22 PyPerfUtil* util) override;
23
24 private:
25 bool showGILState_;
26 bool showThreadState_;
27 bool showPthreadIDState_;
28};
29
30} // namespace pyperf
31} // namespace ebpf