summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2011-12-19 09:56:35 +0000
committerManuel Klimek <klimek@google.com>2011-12-19 09:56:35 +0000
commit7582bbc67cae3b979329e4459e38765142a635cb (patch)
tree0fc6781da662e8966e50a0384f2f1016911c774c /llvm/utils
parent51945952ce295113f4abbed7b1854972ce8f7059 (diff)
downloadbcm5719-llvm-7582bbc67cae3b979329e4459e38765142a635cb.tar.gz
bcm5719-llvm-7582bbc67cae3b979329e4459e38765142a635cb.zip
Allow for benchmarking more than 4GB of memory
llvm-svn: 146864
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/json-bench/JSONBench.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/json-bench/JSONBench.cpp b/llvm/utils/json-bench/JSONBench.cpp
index 810ebfcdefc..dc2285dfa39 100644
--- a/llvm/utils/json-bench/JSONBench.cpp
+++ b/llvm/utils/json-bench/JSONBench.cpp
@@ -23,7 +23,7 @@ Verify("verify", llvm::cl::desc(
"Run a quick verification useful for regression testing"),
llvm::cl::init(false));
-static llvm::cl::opt<unsigned>
+static llvm::cl::opt<size_t>
MemoryLimitMB("memory-limit", llvm::cl::desc(
"Do not use more megabytes of memory"),
llvm::cl::init(1000));
@@ -49,11 +49,11 @@ void benchmark(llvm::TimerGroup &Group, llvm::StringRef Name,
Parsing.stopTimer();
}
-std::string createJSONText(unsigned MemoryMB, unsigned ValueSize) {
+std::string createJSONText(size_t MemoryMB, unsigned ValueSize) {
std::string JSONText;
llvm::raw_string_ostream Stream(JSONText);
Stream << "[\n";
- unsigned MemoryBytes = MemoryMB * 1024 * 1024;
+ size_t MemoryBytes = MemoryMB * 1024 * 1024;
while (JSONText.size() < MemoryBytes) {
Stream << " {\n"
<< " \"key1\": \"" << std::string(ValueSize, '*') << "\",\n"
OpenPOWER on IntegriCloud