• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef HIDUMPER_SERVICES_DUMPER_CONSTANT_H
16 #define HIDUMPER_SERVICES_DUMPER_CONSTANT_H
17 
18 #include <string>
19 #include <vector>
20 #include <iostream>
21 #include <memory>
22 
23 namespace OHOS {
24 namespace HiviewDFX {
25 enum DumperConstant {
26     NONE,
27     GROUP,        // group
28     DUMPER_BEGIN, // dumper begin
29     CPU_DUMPER,
30     FILE_DUMPER,
31     ENV_PARAM_DUMPER,
32     CMD_DUMPER,
33     PROPERTIES_DUMPER,
34     API_DUMPER,
35     LIST_DUMPER,
36     VERSION_DUMPER,
37     SA_DUMPER,
38     MEMORY_DUMPER,
39     STACK_DUMPER,
40     DUMPER_END,   // dumper end
41     FILTER_BEGIN, // filter begin
42     COLUMN_ROWS_FILTER,
43     FILE_FORMAT_DUMP_FILTER,
44     FILTER_END,   // filter end
45     OUTPUT_BEGIN, // output begin
46     STD_OUTPUT,
47     FILE_OUTPUT,
48     FD_OUTPUT,
49     ZIP_OUTPUT,
50     OUTPUT_END,  // output end
51     LEVEL_BEGIN, // level begin
52     LEVEL_NONE,
53     LEVEL_MIDDLE,
54     LEVEL_HIGH,
55     LEVEL_ALL,
56     LEVEL_END,       // level end
57     GROUPTYPE_BEGIN, // group type begin
58     GROUPTYPE_PID,   // pid of group type
59     GROUPTYPE_CPUID, // cpuid of group type
60     GROUPTYPE_END,   // group type end
61     LOOP,
62 };
63 
64 const std::string LOG_DEFAULT = "log.txt";
65 const std::string ZIP_FILEEXT = "zip";
66 const std::string ZIP_FOLDER = "/data/log/hidumper/";
67 
68 const std::string RELEASE_MODE = "Release";
69 } // namespace HiviewDFX
70 } // namespace OHOS
71 #endif // HIDUMPER_SERVICES_DUMPER_CONSTANT_H
72