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

Side by Side Diff: third_party/tcmalloc/chromium/src/profiler.cc

Issue 14321006: Adds TCMalloc support for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always use phtread_once Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2005, Google Inc. 1 // Copyright (c) 2005, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #ifdef HAVE_UNISTD_H 43 #ifdef HAVE_UNISTD_H
44 #include <unistd.h> // for getpid() 44 #include <unistd.h> // for getpid()
45 #endif 45 #endif
46 #if defined(HAVE_SYS_UCONTEXT_H) 46 #if defined(HAVE_SYS_UCONTEXT_H)
47 #include <sys/ucontext.h> 47 #include <sys/ucontext.h>
48 #elif defined(HAVE_UCONTEXT_H) 48 #elif defined(HAVE_UCONTEXT_H)
49 #include <ucontext.h> 49 #include <ucontext.h>
50 #elif defined(HAVE_CYGWIN_SIGNAL_H) 50 #elif defined(HAVE_CYGWIN_SIGNAL_H)
51 #include <cygwin/signal.h> 51 #include <cygwin/signal.h>
52 typedef ucontext ucontext_t; 52 typedef ucontext ucontext_t;
53 #elif defined(__ANDROID__)
54 // Do not define ucontext_t here.
53 #else 55 #else
54 typedef int ucontext_t; // just to quiet the compiler, mostly 56 typedef int ucontext_t; // just to quiet the compiler, mostly
55 #endif 57 #endif
56 #include <sys/time.h> 58 #include <sys/time.h>
57 #include <string> 59 #include <string>
58 #include <gperftools/profiler.h> 60 #include <gperftools/profiler.h>
59 #include <gperftools/stacktrace.h> 61 #include <gperftools/stacktrace.h>
60 #include "base/commandlineflags.h" 62 #include "base/commandlineflags.h"
61 #include "base/logging.h" 63 #include "base/logging.h"
62 #include "base/googleinit.h" 64 #include "base/googleinit.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 extern "C" void ProfilerStop() { } 335 extern "C" void ProfilerStop() { }
334 extern "C" void ProfilerGetCurrentState(ProfilerState* state) { 336 extern "C" void ProfilerGetCurrentState(ProfilerState* state) {
335 memset(state, 0, sizeof(*state)); 337 memset(state, 0, sizeof(*state));
336 } 338 }
337 339
338 #endif // OS_CYGWIN 340 #endif // OS_CYGWIN
339 341
340 // DEPRECATED routines 342 // DEPRECATED routines
341 extern "C" PERFTOOLS_DLL_DECL void ProfilerEnable() { } 343 extern "C" PERFTOOLS_DLL_DECL void ProfilerEnable() { }
342 extern "C" PERFTOOLS_DLL_DECL void ProfilerDisable() { } 344 extern "C" PERFTOOLS_DLL_DECL void ProfilerDisable() { }
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/maybe_threads.cc ('k') | third_party/tcmalloc/chromium/src/stacktrace_android-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698