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