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

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

Issue 9666033: Experiment for updating the tcmalloc chromium branch to r144 (gperftools 2.0). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // 3) The gdb unwinder -- also the one used by the c++ exception code. 46 // 3) The gdb unwinder -- also the one used by the c++ exception code.
47 // It's obviously well-tested, but has a fatal flaw: it can call 47 // It's obviously well-tested, but has a fatal flaw: it can call
48 // malloc() from the unwinder. This is a problem because we're 48 // malloc() from the unwinder. This is a problem because we're
49 // trying to use the unwinder to instrument malloc(). 49 // trying to use the unwinder to instrument malloc().
50 // 50 //
51 // Note: if you add a new implementation here, make sure it works 51 // Note: if you add a new implementation here, make sure it works
52 // correctly when GetStackTrace() is called with max_depth == 0. 52 // correctly when GetStackTrace() is called with max_depth == 0.
53 // Some code may do that. 53 // Some code may do that.
54 54
55 #include <config.h> 55 #include <config.h>
56 #include <google/stacktrace.h> 56 #include <gperftools/stacktrace.h>
57 #include "stacktrace_config.h" 57 #include "stacktrace_config.h"
58 58
59 #if defined(STACKTRACE_INL_HEADER) 59 #if defined(STACKTRACE_INL_HEADER)
60 60
61 #define IS_STACK_FRAMES 0 61 #define IS_STACK_FRAMES 0
62 #define IS_WITH_CONTEXT 0 62 #define IS_WITH_CONTEXT 0
63 #define GET_STACK_TRACE_OR_FRAMES \ 63 #define GET_STACK_TRACE_OR_FRAMES \
64 GetStackTrace(void **result, int max_depth, int skip_count) 64 GetStackTrace(void **result, int max_depth, int skip_count)
65 #include STACKTRACE_INL_HEADER 65 #include STACKTRACE_INL_HEADER
66 #undef IS_STACK_FRAMES 66 #undef IS_STACK_FRAMES
(...skipping 25 matching lines...) Expand all
92 GetStackFramesWithContext(void **result, int *sizes, int max_depth, \ 92 GetStackFramesWithContext(void **result, int *sizes, int max_depth, \
93 int skip_count, const void *ucp) 93 int skip_count, const void *ucp)
94 #include STACKTRACE_INL_HEADER 94 #include STACKTRACE_INL_HEADER
95 #undef IS_STACK_FRAMES 95 #undef IS_STACK_FRAMES
96 #undef IS_WITH_CONTEXT 96 #undef IS_WITH_CONTEXT
97 #undef GET_STACK_TRACE_OR_FRAMES 97 #undef GET_STACK_TRACE_OR_FRAMES
98 98
99 #elif 0 99 #elif 0
100 // This is for the benefit of code analysis tools that may have 100 // This is for the benefit of code analysis tools that may have
101 // trouble with the computed #include above. 101 // trouble with the computed #include above.
102 # include "base/stacktrace_x86-inl.h" 102 # include "stacktrace_x86-inl.h"
103 # include "base/stacktrace_libunwind-inl.h" 103 # include "stacktrace_libunwind-inl.h"
104 # include "base/stacktrace_generic-inl.h" 104 # include "stacktrace_generic-inl.h"
105 # include "base/stacktrace_powerpc-inl.h" 105 # include "stacktrace_powerpc-inl.h"
106 # include "base/stacktrace_win32-inl.h" 106 # include "stacktrace_win32-inl.h"
107 # include "stacktrace_arm-inl.h"
107 #else 108 #else
108 # error Cannot calculate stack trace: will need to write for your environment 109 # error Cannot calculate stack trace: will need to write for your environment
109 #endif 110 #endif
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/stack_trace_table.cc ('k') | third_party/tcmalloc/chromium/src/stacktrace_arm-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698