1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ART_PERFETTO_HPROF_PERFETTO_HPROF_H_
18 #define ART_PERFETTO_HPROF_PERFETTO_HPROF_H_
19 
20 #include <ostream>
21 
22 namespace perfetto_hprof {
23 
24 enum class State {
25   // Worker thread not spawned.
26   kUninitialized,
27   // Worker thread spawned, waiting for ACK.
28   kWaitForListener,
29   // Worker thread ready, waiting for data-source.
30   kWaitForStart,
31   // These are only in the forked process:
32   // Data source received, start dump.
33   kStart,
34   // Dump finished. Kill forked child.
35   kEnd,
36 };
37 
38 std::ostream& operator<<(std::ostream& os, State state);
39 
40 }  // namespace perfetto_hprof
41 
42 #endif  // ART_PERFETTO_HPROF_PERFETTO_HPROF_H_
43