mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Merged in autoconf branch. This provides configuration via the autoconf
system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -4,15 +4,16 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Config/malloc.h"
|
||||
|
||||
#include "Support/Timer.h"
|
||||
#include "Support/CommandLine.h"
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#ifndef __FreeBSD__
|
||||
#include <malloc.h>
|
||||
#endif // __FreeBSD__
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Config/sys/resource.h"
|
||||
#include "Config/sys/time.h"
|
||||
#include "Config/unistd.h"
|
||||
#include "Config/malloc.h"
|
||||
#include "Config/stdio.h"
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
@ -21,10 +22,12 @@
|
||||
std::string LibSupportInfoOutputFilename;
|
||||
|
||||
namespace {
|
||||
#ifdef HAVE_MALLINFO
|
||||
cl::opt<bool>
|
||||
TrackSpace("track-memory", cl::desc("Enable -time-passes memory "
|
||||
"tracking (this may be slow)"),
|
||||
cl::Hidden);
|
||||
#endif
|
||||
|
||||
cl::opt<std::string, true>
|
||||
InfoOutputFilename("info-output-file",
|
||||
@ -76,12 +79,12 @@ Timer::~Timer() {
|
||||
}
|
||||
|
||||
static long getMemUsage() {
|
||||
#ifndef __FreeBSD__
|
||||
#ifdef HAVE_MALLINFO
|
||||
if (TrackSpace) {
|
||||
struct mallinfo MI = mallinfo();
|
||||
return MI.uordblks/*+MI.hblkhd*/;
|
||||
}
|
||||
#endif // __FreeBSD__
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user