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

Side by Side Diff: src/runtime-profiler.cc

Issue 20768002: Remove unused methods from RuntimeProfiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: log.h cleanup Created 7 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
« no previous file with comments | « src/runtime-profiler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 kSamplerTicksBetweenThresholdAdjustment; 401 kSamplerTicksBetweenThresholdAdjustment;
402 } 402 }
403 } 403 }
404 404
405 405
406 void RuntimeProfiler::TearDown() { 406 void RuntimeProfiler::TearDown() {
407 // Nothing to do. 407 // Nothing to do.
408 } 408 }
409 409
410 410
411 int RuntimeProfiler::SamplerWindowSize() {
412 return kSamplerWindowSize;
413 }
414
415
416 // Update the pointers in the sampler window after a GC. 411 // Update the pointers in the sampler window after a GC.
417 void RuntimeProfiler::UpdateSamplesAfterScavenge() { 412 void RuntimeProfiler::UpdateSamplesAfterScavenge() {
418 for (int i = 0; i < kSamplerWindowSize; i++) { 413 for (int i = 0; i < kSamplerWindowSize; i++) {
419 Object* function = sampler_window_[i]; 414 Object* function = sampler_window_[i];
420 if (function != NULL && isolate_->heap()->InNewSpace(function)) { 415 if (function != NULL && isolate_->heap()->InNewSpace(function)) {
421 MapWord map_word = HeapObject::cast(function)->map_word(); 416 MapWord map_word = HeapObject::cast(function)->map_word();
422 if (map_word.IsForwardingAddress()) { 417 if (map_word.IsForwardingAddress()) {
423 sampler_window_[i] = map_word.ToForwardingAddress(); 418 sampler_window_[i] = map_word.ToForwardingAddress();
424 } else { 419 } else {
425 sampler_window_[i] = NULL; 420 sampler_window_[i] = NULL;
(...skipping 15 matching lines...) Expand all
441 436
442 437
443 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { 438 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) {
444 for (int i = 0; i < kSamplerWindowSize; i++) { 439 for (int i = 0; i < kSamplerWindowSize; i++) {
445 visitor->VisitPointer(&sampler_window_[i]); 440 visitor->VisitPointer(&sampler_window_[i]);
446 } 441 }
447 } 442 }
448 443
449 444
450 } } // namespace v8::internal 445 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime-profiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698