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

Side by Side Diff: src/platform.h

Issue 6708056: Change the way sampler / profiler handle external callbacks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
« no previous file with comments | « src/log.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 class TickSample { 574 class TickSample {
575 public: 575 public:
576 TickSample() 576 TickSample()
577 : state(OTHER), 577 : state(OTHER),
578 pc(NULL), 578 pc(NULL),
579 sp(NULL), 579 sp(NULL),
580 fp(NULL), 580 fp(NULL),
581 tos(NULL), 581 tos(NULL),
582 frames_count(0) {} 582 frames_count(0) {}
583 StateTag state; // The state of the VM. 583 StateTag state; // The state of the VM.
584 Address pc; // Instruction pointer. 584 Address pc; // Instruction pointer.
585 Address sp; // Stack pointer. 585 Address sp; // Stack pointer.
586 Address fp; // Frame pointer. 586 Address fp; // Frame pointer.
587 Address tos; // Top stack value (*sp). 587 union {
588 Address tos; // Top stack value (*sp).
589 Address external_callback;
590 };
588 static const int kMaxFramesCount = 64; 591 static const int kMaxFramesCount = 64;
589 Address stack[kMaxFramesCount]; // Call stack. 592 Address stack[kMaxFramesCount]; // Call stack.
590 int frames_count; // Number of captured frames. 593 int frames_count : 8; // Number of captured frames.
594 bool has_external_callback : 1;
591 }; 595 };
592 596
593 #ifdef ENABLE_LOGGING_AND_PROFILING 597 #ifdef ENABLE_LOGGING_AND_PROFILING
594 class Sampler { 598 class Sampler {
595 public: 599 public:
596 // Initialize sampler. 600 // Initialize sampler.
597 Sampler(Isolate* isolate, int interval); 601 Sampler(Isolate* isolate, int interval);
598 virtual ~Sampler(); 602 virtual ~Sampler();
599 603
600 int interval() const { return interval_; } 604 int interval() const { return interval_; }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 int samples_taken_; // Counts stack samples taken. 651 int samples_taken_; // Counts stack samples taken.
648 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 652 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
649 }; 653 };
650 654
651 655
652 #endif // ENABLE_LOGGING_AND_PROFILING 656 #endif // ENABLE_LOGGING_AND_PROFILING
653 657
654 } } // namespace v8::internal 658 } } // namespace v8::internal
655 659
656 #endif // V8_PLATFORM_H_ 660 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698