Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: tools/android/heap_profiler/heap_profiler_integrationtest.cc

Issue 1369153002: Port most of the remainder of //tools/android from GYP to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <dlfcn.h> 5 #include <dlfcn.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 #include <sys/mman.h> 9 #include <sys/mman.h>
10 #include <unistd.h> 10 #include <unistd.h>
11 #include <map> 11 #include <map>
12 12
13 #include "base/compiler_specific.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 #include "tools/android/heap_profiler/heap_profiler.h" 14 #include "tools/android/heap_profiler/heap_profiler.h"
16 15
17 namespace { 16 namespace {
18 17
19 typedef void* (*AllocatorFn)(size_t); 18 typedef void* (*AllocatorFn)(size_t);
20 typedef int (*FreeFn)(void*, size_t); 19 typedef int (*FreeFn)(void*, size_t);
21 20
22 const size_t kSize1 = 499 * PAGE_SIZE; 21 const size_t kSize1 = 499 * PAGE_SIZE;
23 const size_t kSize2 = 503 * PAGE_SIZE; 22 const size_t kSize2 = 503 * PAGE_SIZE;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 char* const env[] = {env_ld_preload, env_ld_lib_path, 0}; 169 char* const env[] = {env_ld_preload, env_ld_lib_path, 0};
171 execve("/proc/self/exe", argv, env); 170 execve("/proc/self/exe", argv, env);
172 // execve() never returns, unless something goes wrong. 171 // execve() never returns, unless something goes wrong.
173 perror("execve"); 172 perror("execve");
174 assert(false); 173 assert(false);
175 } 174 }
176 175
177 testing::InitGoogleTest(&argc, argv); 176 testing::InitGoogleTest(&argc, argv);
178 return RUN_ALL_TESTS(); 177 return RUN_ALL_TESTS();
179 } 178 }
OLDNEW
« no previous file with comments | « tools/android/heap_profiler/BUILD.gn ('k') | tools/android/heap_profiler/heap_profiler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698