| 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 | 589 |
| 590 // TickSample captures the information collected for each sample. | 590 // TickSample captures the information collected for each sample. |
| 591 class TickSample { | 591 class TickSample { |
| 592 public: | 592 public: |
| 593 TickSample() | 593 TickSample() |
| 594 : state(OTHER), | 594 : state(OTHER), |
| 595 pc(NULL), | 595 pc(NULL), |
| 596 sp(NULL), | 596 sp(NULL), |
| 597 fp(NULL), | 597 fp(NULL), |
| 598 tos(NULL), | 598 tos(NULL), |
| 599 frames_count(0) {} | 599 frames_count(0), |
| 600 has_external_callback(false) {} |
| 600 StateTag state; // The state of the VM. | 601 StateTag state; // The state of the VM. |
| 601 Address pc; // Instruction pointer. | 602 Address pc; // Instruction pointer. |
| 602 Address sp; // Stack pointer. | 603 Address sp; // Stack pointer. |
| 603 Address fp; // Frame pointer. | 604 Address fp; // Frame pointer. |
| 604 union { | 605 union { |
| 605 Address tos; // Top stack value (*sp). | 606 Address tos; // Top stack value (*sp). |
| 606 Address external_callback; | 607 Address external_callback; |
| 607 }; | 608 }; |
| 608 static const int kMaxFramesCount = 64; | 609 static const int kMaxFramesCount = 64; |
| 609 Address stack[kMaxFramesCount]; // Call stack. | 610 Address stack[kMaxFramesCount]; // Call stack. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 int samples_taken_; // Counts stack samples taken. | 669 int samples_taken_; // Counts stack samples taken. |
| 669 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 670 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| 670 }; | 671 }; |
| 671 | 672 |
| 672 | 673 |
| 673 #endif // ENABLE_LOGGING_AND_PROFILING | 674 #endif // ENABLE_LOGGING_AND_PROFILING |
| 674 | 675 |
| 675 } } // namespace v8::internal | 676 } } // namespace v8::internal |
| 676 | 677 |
| 677 #endif // V8_PLATFORM_H_ | 678 #endif // V8_PLATFORM_H_ |
| OLD | NEW |