Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: courgette/courgette_tool.cc

Issue 2883773002: [Courgette Experiment] Track and print TempMapping total and peak allocation to measure Courgette d…
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | courgette/memory_allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <initializer_list> 9 #include <initializer_list>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/at_exit.h" 14 #include "base/at_exit.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/files/file_util.h" 17 #include "base/files/file_util.h"
18 #include "base/files/memory_mapped_file.h" 18 #include "base/files/memory_mapped_file.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/string_util.h" 22 #include "base/strings/string_util.h"
23 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
24 #include "courgette/assembly_program.h" 24 #include "courgette/assembly_program.h"
25 #include "courgette/courgette.h" 25 #include "courgette/courgette.h"
26 #include "courgette/courgette_flow.h" 26 #include "courgette/courgette_flow.h"
27 #include "courgette/encoded_program.h" 27 #include "courgette/encoded_program.h"
28 #include "courgette/memory_allocator.h"
28 #include "courgette/program_detector.h" 29 #include "courgette/program_detector.h"
29 #include "courgette/streams.h" 30 #include "courgette/streams.h"
30 #include "courgette/third_party/bsdiff/bsdiff.h" 31 #include "courgette/third_party/bsdiff/bsdiff.h"
31 32
32 namespace { 33 namespace {
33 34
34 using courgette::CourgetteFlow; 35 using courgette::CourgetteFlow;
35 36
36 const char kUsageGen[] = "-gen <old_in> <new_in> <patch_out>"; 37 const char kUsageGen[] = "-gen <old_in> <new_in> <patch_out>";
37 const char kUsageApply[] = "-apply <old_in> <patch_in> <new_out>"; 38 const char kUsageApply[] = "-apply <old_in> <patch_in> <new_out>";
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } else if (cmd_spread_1_adjusted || cmd_spread_1_unadjusted) { 458 } else if (cmd_spread_1_adjusted || cmd_spread_1_unadjusted) {
458 if (values.size() != 3) 459 if (values.size() != 3)
459 UsageProblem(kUsageGen1); 460 UsageProblem(kUsageGen1);
460 DisassembleAdjustDiff(values[0], values[1], values[2], 461 DisassembleAdjustDiff(values[0], values[1], values[2],
461 cmd_spread_1_adjusted); 462 cmd_spread_1_adjusted);
462 } else { 463 } else {
463 UsageProblem("No operation specified"); 464 UsageProblem("No operation specified");
464 } 465 }
465 } 466 }
466 467
468 fprintf(stderr, "TempMapping: Cur: %lld\n",
469 courgette::TempMapping::alloc_cur);
470 fprintf(stderr, "TempMapping: Sum: %lld\n",
471 courgette::TempMapping::alloc_sum);
472 fprintf(stderr, "TempMapping: Max: %lld\n",
473 courgette::TempMapping::alloc_max);
474
467 return 0; 475 return 0;
468 } 476 }
OLDNEW
« no previous file with comments | « no previous file | courgette/memory_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698