mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Allow for benchmarking more than 4GB of memory
llvm-svn: 146864
This commit is contained in:
parent
99a78498c5
commit
6e33b2fd7d
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user