lin
2025-08-01 633231e833e21d5b8b1c00cb15aedb62b3b78e8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
 
#ifndef CHROMIUMOS_WIDE_PROFILING_CONVERSION_UTILS_H_
#define CHROMIUMOS_WIDE_PROFILING_CONVERSION_UTILS_H_
 
#include <string>
 
#include "compat/string.h"
 
namespace quipper {
 
// Format string for perf.data.
extern const char kPerfFormat[];
 
// Format string for protobuf text format.
extern const char kProtoTextFormat[];
 
// Structure to hold the format and file of an input or output.
struct FormatAndFile {
  // The name of the file.
  string filename;
 
  // The format of the file. Options are "perf" for perf data files, "text" for
  // proto text files and "proto" for proto binary files.
  string format;
};
 
// Convert a perf file from one format to another.
bool ConvertFile(const FormatAndFile& input, const FormatAndFile& output);
 
}  // namespace quipper
 
#endif  // CHROMIUMOS_WIDE_PROFILING_CONVERSION_UTILS_H_