File: sample_merger.cc

package info (click to toggle)
autofdo 0.18-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 92,568 kB
  • sloc: cpp: 26,830; sh: 12,538; makefile: 344; ansic: 134; python: 95
file content (28 lines) | stat: -rw-r--r-- 785 bytes parent folder | download | duplicates (2)
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
// Copyright 2011 Google Inc. All Rights Reserved.
// Author: dehao@google.com (Dehao Chen)

// Main function to merge different type of profile into txt profile.

#include "base/common.h"
#include "profile_creator.h"

DEFINE_string(profile, "data.profile",
              "Profile file name");
DEFINE_string(profiler, "perf",
              "Profile type");
DEFINE_string(output_file, "data.txt",
              "Merged profile file name");
DEFINE_string(binary, "data.binary",
              "Binary file name");

int main(int argc, char **argv) {
  google::ParseCommandLineFlags(&argc, &argv, true);
  google::InitGoogleLogging(argv[0]);

  if (autofdo::MergeSample(
      FLAGS_profile, FLAGS_profiler, FLAGS_binary, FLAGS_output_file)) {
    return 0;
  } else {
    return -1;
  }
}