OLD | NEW |
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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 fp(NULL), | 522 fp(NULL), |
523 function(NULL), | 523 function(NULL), |
524 state(OTHER), | 524 state(OTHER), |
525 frames_count(0) {} | 525 frames_count(0) {} |
526 Address pc; // Instruction pointer. | 526 Address pc; // Instruction pointer. |
527 Address sp; // Stack pointer. | 527 Address sp; // Stack pointer. |
528 Address fp; // Frame pointer. | 528 Address fp; // Frame pointer. |
529 Address function; // The last called JS function. | 529 Address function; // The last called JS function. |
530 StateTag state; // The state of the VM. | 530 StateTag state; // The state of the VM. |
531 static const int kMaxFramesCount = 100; | 531 static const int kMaxFramesCount = 100; |
532 EmbeddedVector<Address, kMaxFramesCount> stack; // Call stack. | 532 Address stack[kMaxFramesCount]; // Call stack. |
533 int frames_count; // Number of captured frames. | 533 int frames_count; // Number of captured frames. |
534 }; | 534 }; |
535 | 535 |
536 class Sampler { | 536 class Sampler { |
537 public: | 537 public: |
538 // Initialize sampler. | 538 // Initialize sampler. |
539 explicit Sampler(int interval, bool profiling); | 539 explicit Sampler(int interval, bool profiling); |
540 virtual ~Sampler(); | 540 virtual ~Sampler(); |
541 | 541 |
542 // Performs stack sampling. | 542 // Performs stack sampling. |
(...skipping 21 matching lines...) Expand all Loading... |
564 bool active_; | 564 bool active_; |
565 PlatformData* data_; // Platform specific data. | 565 PlatformData* data_; // Platform specific data. |
566 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 566 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
567 }; | 567 }; |
568 | 568 |
569 #endif // ENABLE_LOGGING_AND_PROFILING | 569 #endif // ENABLE_LOGGING_AND_PROFILING |
570 | 570 |
571 } } // namespace v8::internal | 571 } } // namespace v8::internal |
572 | 572 |
573 #endif // V8_PLATFORM_H_ | 573 #endif // V8_PLATFORM_H_ |
OLD | NEW |