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

Side by Side Diff: tools/android/heap_profiler/heap_profiler_hooks_android.c

Issue 1549203002: Switch to standard integer types in tools/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 <errno.h> 6 #include <errno.h>
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stdbool.h> 8 #include <stdbool.h>
9 #include <stddef.h>
10 #include <stdint.h>
9 #include <stdlib.h> 11 #include <stdlib.h>
10 #include <string.h> 12 #include <string.h>
11 #include <sys/mman.h> 13 #include <sys/mman.h>
12 #include <unistd.h> 14 #include <unistd.h>
13 #include <unwind.h> 15 #include <unwind.h>
14 16
15 #include "tools/android/heap_profiler/heap_profiler.h" 17 #include "tools/android/heap_profiler/heap_profiler.h"
16 18
17 #define HEAP_PROFILER_EXPORT __attribute__((visibility("default"))) 19 #define HEAP_PROFILER_EXPORT __attribute__((visibility("default")))
18 20
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 state->frames[state->frame_count++] = ip; 202 state->frames[state->frame_count++] = ip;
201 return (state->frame_count >= state->max_depth) ? 203 return (state->frame_count >= state->max_depth) ?
202 _URC_END_OF_STACK : _URC_NO_REASON; 204 _URC_END_OF_STACK : _URC_NO_REASON;
203 } 205 }
204 206
205 static uint32_t get_backtrace(uintptr_t* frames, uint32_t max_depth) { 207 static uint32_t get_backtrace(uintptr_t* frames, uint32_t max_depth) {
206 stack_crawl_state_t state = {.frames = frames, .max_depth = max_depth}; 208 stack_crawl_state_t state = {.frames = frames, .max_depth = max_depth};
207 _Unwind_Backtrace(unwind_fn, &state); 209 _Unwind_Backtrace(unwind_fn, &state);
208 return state.frame_count; 210 return state.frame_count;
209 } 211 }
OLDNEW
« no previous file with comments | « tools/android/heap_profiler/heap_profiler.h ('k') | tools/android/heap_profiler/heap_profiler_integrationtest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698