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

Side by Side Diff: third_party/tcmalloc/chromium/src/profile-handler.cc

Issue 7430007: Merge tcmalloc r111 (perftools v. 1.8) with the chromium/ branch. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/third_party/tcmalloc/vendor/src/profile-handler.cc:r93000
OLDNEW
1 // Copyright (c) 2009, Google Inc. 1 // Copyright (c) 2009, 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 18 matching lines...) Expand all
29 29
30 // --- 30 // ---
31 // Author: Sanjay Ghemawat 31 // Author: Sanjay Ghemawat
32 // Nabeel Mian 32 // Nabeel Mian
33 // 33 //
34 // Implements management of profile timers and the corresponding signal handler. 34 // Implements management of profile timers and the corresponding signal handler.
35 35
36 #include "config.h" 36 #include "config.h"
37 #include "profile-handler.h" 37 #include "profile-handler.h"
38 38
39 #if !(defined(__CYGWIN__) || defined(__CYGWIN32__)) 39 #if !(defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(__native_client_ _)
40 40
41 #include <stdio.h> 41 #include <stdio.h>
42 #include <errno.h> 42 #include <errno.h>
43 #include <sys/time.h> 43 #include <sys/time.h>
44 44
45 #include <list> 45 #include <list>
46 #include <string> 46 #include <string>
47 47
48 #include "base/dynamic_annotations.h" 48 #include "base/dynamic_annotations.h"
49 #include "base/logging.h" 49 #include "base/logging.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 471 }
472 472
473 extern "C" void ProfileHandlerReset() { 473 extern "C" void ProfileHandlerReset() {
474 return ProfileHandler::Instance()->Reset(); 474 return ProfileHandler::Instance()->Reset();
475 } 475 }
476 476
477 extern "C" void ProfileHandlerGetState(ProfileHandlerState* state) { 477 extern "C" void ProfileHandlerGetState(ProfileHandlerState* state) {
478 ProfileHandler::Instance()->GetState(state); 478 ProfileHandler::Instance()->GetState(state);
479 } 479 }
480 480
481 #else // OS_CYGWIN 481 #else // !defined(OS_CYGWIN) && !defined(__native_client__)
482 482
483 // ITIMER_PROF doesn't work under cygwin. ITIMER_REAL is available, but doesn't 483 // ITIMER_PROF doesn't work under cygwin. ITIMER_REAL is available, but doesn't
484 // work as well for profiling, and also interferes with alarm(). Because of 484 // work as well for profiling, and also interferes with alarm(). Because of
485 // these issues, unless a specific need is identified, profiler support is 485 // these issues, unless a specific need is identified, profiler support is
486 // disabled under Cygwin. 486 // disabled under Cygwin.
487 //
488 // Native Client runtime also does not have signals working.
487 extern "C" void ProfileHandlerRegisterThread() { 489 extern "C" void ProfileHandlerRegisterThread() {
488 } 490 }
489 491
490 extern "C" ProfileHandlerToken* ProfileHandlerRegisterCallback( 492 extern "C" ProfileHandlerToken* ProfileHandlerRegisterCallback(
491 ProfileHandlerCallback callback, void* callback_arg) { 493 ProfileHandlerCallback callback, void* callback_arg) {
492 return NULL; 494 return NULL;
493 } 495 }
494 496
495 extern "C" void ProfileHandlerUnregisterCallback(ProfileHandlerToken* token) { 497 extern "C" void ProfileHandlerUnregisterCallback(ProfileHandlerToken* token) {
496 } 498 }
497 499
498 extern "C" void ProfileHandlerReset() { 500 extern "C" void ProfileHandlerReset() {
499 } 501 }
500 502
501 extern "C" void ProfileHandlerGetState(ProfileHandlerState* state) { 503 extern "C" void ProfileHandlerGetState(ProfileHandlerState* state) {
502 } 504 }
503 505
504 #endif // OS_CYGWIN 506 #endif // !defined(OS_CYGWIN) && !defined(__native_client__)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698