1 // Copyright 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.
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.
13 #include "chrome_elf/dll_hash/dll_hash.h"
15 int main(int argc
, char** argv
) {
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", argv
[0]);
23 for (int i
= 1; i
< argc
; i
++) {
24 int hash
= DllNameToHash(std::string(argv
[i
]));
25 printf("<int value=\"%d\" label=\"%s\"/>\n", hash
, argv
[i
]);