• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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 SRC_TRACE_PROCESSOR_TABLES_ANDROID_TABLES_H_
18 #define SRC_TRACE_PROCESSOR_TABLES_ANDROID_TABLES_H_
19 
20 #include "src/trace_processor/tables/macros.h"
21 
22 namespace perfetto {
23 namespace trace_processor {
24 namespace tables {
25 
26 // Log entries from Android logcat.
27 //
28 // NOTE: this table is not sorted by timestamp. This is why we omit the
29 // sorted flag on the ts column.
30 //
31 // @param ts timestamp of log entry.
32 // @param utid thread writing the log entry {@joinable thread.utid}.
33 // @param prio priority of the log. 3=DEBUG, 4=INFO, 5=WARN, 6=ERROR.
34 // @param tag tag of the log entry.
35 // @param msg content of the log entry.
36 // @tablegroup Events
37 #define PERFETTO_TP_ANDROID_LOG_TABLE_DEF(NAME, PARENT, C) \
38   NAME(AndroidLogTable, "android_logs")                    \
39   PERFETTO_TP_ROOT_TABLE(PARENT, C)                        \
40   C(int64_t, ts)                                           \
41   C(uint32_t, utid)                                        \
42   C(uint32_t, prio)                                        \
43   C(StringPool::Id, tag)                                   \
44   C(StringPool::Id, msg)
45 
46 PERFETTO_TP_TABLE(PERFETTO_TP_ANDROID_LOG_TABLE_DEF);
47 
48 }  // namespace tables
49 }  // namespace trace_processor
50 }  // namespace perfetto
51 
52 #endif  // SRC_TRACE_PROCESSOR_TABLES_ANDROID_TABLES_H_
53