~ubuntu-branches/ubuntu/precise/nodejs/precise

« back to all changes in this revision

Viewing changes to deps/v8/src/log.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jérémy Lal
  • Date: 2010-08-20 11:49:04 UTC
  • mfrom: (7.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100820114904-lz22w6fkth7yh179
Tags: 0.2.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
 
310
310
void Profiler::Run() {
311
311
  TickSample sample;
312
 
  bool overflow = Logger::profiler_->Remove(&sample);
 
312
  bool overflow = Remove(&sample);
313
313
  while (running_) {
314
314
    LOG(TickEvent(&sample, overflow));
315
 
    overflow = Logger::profiler_->Remove(&sample);
 
315
    overflow = Remove(&sample);
316
316
  }
317
317
}
318
318
 
1150
1150
 
1151
1151
int Logger::GetActiveProfilerModules() {
1152
1152
  int result = PROFILER_MODULE_NONE;
1153
 
  if (!profiler_->paused()) {
 
1153
  if (profiler_ != NULL && !profiler_->paused()) {
1154
1154
    result |= PROFILER_MODULE_CPU;
1155
1155
  }
1156
1156
  if (FLAG_log_gc) {
1162
1162
 
1163
1163
void Logger::PauseProfiler(int flags, int tag) {
1164
1164
  if (!Log::IsEnabled()) return;
1165
 
  if (flags & PROFILER_MODULE_CPU) {
 
1165
  if (profiler_ != NULL && (flags & PROFILER_MODULE_CPU)) {
1166
1166
    // It is OK to have negative nesting.
1167
1167
    if (--cpu_profiler_nesting_ == 0) {
1168
1168
      profiler_->pause();
1193
1193
  if (tag != 0) {
1194
1194
    UncheckedIntEvent("open-tag", tag);
1195
1195
  }
1196
 
  if (flags & PROFILER_MODULE_CPU) {
 
1196
  if (profiler_ != NULL && (flags & PROFILER_MODULE_CPU)) {
1197
1197
    if (cpu_profiler_nesting_++ == 0) {
1198
1198
      ++logging_nesting_;
1199
1199
      if (FLAG_prof_lazy) {
1295
1295
        description = "A call IC from the snapshot";
1296
1296
        tag = Logger::CALL_IC_TAG;
1297
1297
        break;
 
1298
      case Code::KEYED_CALL_IC:
 
1299
        description = "A keyed call IC from the snapshot";
 
1300
        tag = Logger::KEYED_CALL_IC_TAG;
 
1301
        break;
1298
1302
    }
1299
1303
    PROFILE(CodeCreateEvent(tag, code_object, description));
1300
1304
  }