avoid VLOG dependency in heap-profiler test
This makes the test compatible with -fvisibility=hidden
This commit is contained in:
parent
c23bbdb4c7
commit
d5bd0087c1
|
@ -59,10 +59,12 @@
|
|||
static const int kMaxCount = 100000;
|
||||
int* g_array[kMaxCount]; // an array of int-vectors
|
||||
|
||||
static const char* volatile marker;
|
||||
|
||||
static ATTRIBUTE_NOINLINE void Allocate(int start, int end, int size) {
|
||||
// NOTE: we're using this to prevent gcc 5 from merging otherwise
|
||||
// identical Allocate & Allocate2 functions.
|
||||
VLOG(10, "Allocate");
|
||||
marker = "Allocate";
|
||||
for (int i = start; i < end; ++i) {
|
||||
if (i < kMaxCount)
|
||||
g_array[i] = new int[size];
|
||||
|
@ -70,7 +72,7 @@ static ATTRIBUTE_NOINLINE void Allocate(int start, int end, int size) {
|
|||
}
|
||||
|
||||
static ATTRIBUTE_NOINLINE void Allocate2(int start, int end, int size) {
|
||||
VLOG(10, "Allocate2");
|
||||
marker = "Allocate2";
|
||||
for (int i = start; i < end; ++i) {
|
||||
if (i < kMaxCount)
|
||||
g_array[i] = new int[size];
|
||||
|
|
Loading…
Reference in New Issue