Hector Dearman | 85ef536 | 2018-03-27 14:48:47 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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 TOOLS_TRACE_TO_TEXT_FTRACE_EVENT_FORMATTER_H_ |
| 18 | #define TOOLS_TRACE_TO_TEXT_FTRACE_EVENT_FORMATTER_H_ |
| 19 | |
| 20 | #include "tools/trace_to_text/ftrace_event_formatter.h" |
| 21 | |
| 22 | #include <string> |
Isabelle Taylor | 0a6b4c7 | 2018-10-15 11:30:52 +0100 | [diff] [blame] | 23 | #include <unordered_map> |
Hector Dearman | 85ef536 | 2018-03-27 14:48:47 +0100 | [diff] [blame] | 24 | |
| 25 | #include "perfetto/trace/trace_packet.pb.h" |
| 26 | |
| 27 | namespace perfetto { |
| 28 | |
Isabelle Taylor | 0a6b4c7 | 2018-10-15 11:30:52 +0100 | [diff] [blame] | 29 | std::string FormatFtraceEvent( |
| 30 | uint64_t timestamp, |
Primiano Tucci | 1c752c1 | 2018-10-23 09:27:19 +0100 | [diff] [blame] | 31 | uint32_t cpu, |
Isabelle Taylor | 0a6b4c7 | 2018-10-15 11:30:52 +0100 | [diff] [blame] | 32 | const protos::FtraceEvent&, |
Isabelle Taylor | 62f3585 | 2018-11-08 10:54:39 +0000 | [diff] [blame] | 33 | const std::unordered_map<uint32_t /*tid*/, uint32_t /*tgid*/>& thread_map, |
| 34 | std::unordered_map<uint32_t /*tid*/, std::string>& thread_names); |
Hector Dearman | 85ef536 | 2018-03-27 14:48:47 +0100 | [diff] [blame] | 35 | |
| 36 | } // namespace perfetto |
| 37 | |
| 38 | #endif // TOOLS_TRACE_TO_TEXT_FTRACE_EVENT_FORMATTER_H_ |