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

Side by Side Diff: src/log.h

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Created 9 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Forward declarations. 71 // Forward declarations.
72 class Ticker; 72 class Ticker;
73 class Profiler; 73 class Profiler;
74 class Semaphore; 74 class Semaphore;
75 class SlidingStateWindow; 75 class SlidingStateWindow;
76 class LogMessageBuilder; 76 class LogMessageBuilder;
77 77
78 #undef LOG 78 #undef LOG
79 // TODO(isolates): pass isolate pointer here. 79 // TODO(isolates): pass isolate pointer here.
80 #ifdef ENABLE_LOGGING_AND_PROFILING 80 #ifdef ENABLE_LOGGING_AND_PROFILING
81 #define LOG(Call) \ 81 #define LOG(isolate,Call) \
82 do { \ 82 do { \
83 v8::internal::Logger* logger = \ 83 v8::internal::Logger* logger = \
84 v8::internal::Isolate::Current()->logger(); \ 84 (isolate)->logger(); \
85 if (logger->is_logging()) \ 85 if (logger->is_logging()) \
86 logger->Call; \ 86 logger->Call; \
87 } while (false) 87 } while (false)
88 #else 88 #else
89 #define LOG(Call) ((void) 0) 89 #define LOG(isolate,Call) ((void) 0)
90 #endif 90 #endif
91 91
92 #define LOG_EVENTS_AND_TAGS_LIST(V) \ 92 #define LOG_EVENTS_AND_TAGS_LIST(V) \
93 V(CODE_CREATION_EVENT, "code-creation") \ 93 V(CODE_CREATION_EVENT, "code-creation") \
94 V(CODE_MOVE_EVENT, "code-move") \ 94 V(CODE_MOVE_EVENT, "code-move") \
95 V(CODE_DELETE_EVENT, "code-delete") \ 95 V(CODE_DELETE_EVENT, "code-delete") \
96 V(CODE_MOVING_GC, "code-moving-gc") \ 96 V(CODE_MOVING_GC, "code-moving-gc") \
97 V(SFI_MOVE_EVENT, "sfi-move") \ 97 V(SFI_MOVE_EVENT, "sfi-move") \
98 V(SNAPSHOT_POSITION_EVENT, "snapshot-pos") \ 98 V(SNAPSHOT_POSITION_EVENT, "snapshot-pos") \
99 V(TICK_EVENT, "tick") \ 99 V(TICK_EVENT, "tick") \
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // Class that extracts stack trace, used for profiling. 438 // Class that extracts stack trace, used for profiling.
439 class StackTracer : public AllStatic { 439 class StackTracer : public AllStatic {
440 public: 440 public:
441 static void Trace(Isolate* isolate, TickSample* sample); 441 static void Trace(Isolate* isolate, TickSample* sample);
442 }; 442 };
443 443
444 } } // namespace v8::internal 444 } } // namespace v8::internal
445 445
446 446
447 #endif // V8_LOG_H_ 447 #endif // V8_LOG_H_
OLDNEW
« src/compiler.cc ('K') | « src/jsregexp.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698