OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium 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 // This is a utility executable used for generating hashes for dll names | |
6 // for inclusion in tools/metrics/histograms/histograms.xml. Every | |
7 // dll name must have a corresponding entry in the enum there. | |
8 | |
9 #include <stdio.h> | |
10 #include <stdlib.h> | |
11 #include <string.h> | |
12 | |
13 #include "chrome_elf/dll_hash_for_uma/dll_hash_for_uma.h" | |
14 | |
15 int main(int argc, char **argv) { | |
16 if (argc < 2) { | |
17 fprintf(stderr, "Usage: %s <dll name> <dll name> <...>\n", argv[0]); | |
18 fprintf(stderr, "\n"); | |
19 fprintf(stderr, "Prints hashes for dll names.\n"); | |
20 fprintf(stderr, "Example: %s \"my_dll.dll\" \"user32.dll\"\n", | |
21 argv[0]); | |
Alexei Svitkine (slow)
2014/02/26 14:32:14
Nit: fits on previous line? If not, indent 2 more.
csharp
2014/02/26 17:42:56
Done.
| |
22 return 1; | |
23 } | |
24 for (int i = 1; i < argc; i++) { | |
25 int hash = DllNameToHash(std::string(argv[i])); | |
26 printf("<int value=\"%d\" label=\"%s\"/>\n", hash, argv[i]); | |
27 } | |
28 return 0; | |
29 } | |
OLD | NEW |