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

Side by Side Diff: src/platform.h

Issue 1523015: C++ profiles processor: align browser mode with the old implementation, sample VM state. (Closed)
Patch Set: Using Script::type to filter out native scripts. Created 10 years, 8 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
« no previous file with comments | « src/log-inl.h ('k') | src/platform-linux.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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // Sampler 509 // Sampler
510 // 510 //
511 // A sampler periodically samples the state of the VM and optionally 511 // A sampler periodically samples the state of the VM and optionally
512 // (if used for profiling) the program counter and stack pointer for 512 // (if used for profiling) the program counter and stack pointer for
513 // the thread that created it. 513 // the thread that created it.
514 514
515 // TickSample captures the information collected for each sample. 515 // TickSample captures the information collected for each sample.
516 class TickSample { 516 class TickSample {
517 public: 517 public:
518 TickSample() 518 TickSample()
519 : pc(NULL), 519 : state(OTHER),
520 pc(NULL),
520 sp(NULL), 521 sp(NULL),
521 fp(NULL), 522 fp(NULL),
522 function(NULL), 523 function(NULL),
523 state(OTHER),
524 frames_count(0) {} 524 frames_count(0) {}
525 StateTag state; // The state of the VM.
525 Address pc; // Instruction pointer. 526 Address pc; // Instruction pointer.
526 Address sp; // Stack pointer. 527 Address sp; // Stack pointer.
527 Address fp; // Frame pointer. 528 Address fp; // Frame pointer.
528 Address function; // The last called JS function. 529 Address function; // The last called JS function.
529 StateTag state; // The state of the VM.
530 static const int kMaxFramesCount = 64; 530 static const int kMaxFramesCount = 64;
531 Address stack[kMaxFramesCount]; // Call stack. 531 Address stack[kMaxFramesCount]; // Call stack.
532 int frames_count; // Number of captured frames. 532 int frames_count; // Number of captured frames.
533 }; 533 };
534 534
535 #ifdef ENABLE_LOGGING_AND_PROFILING 535 #ifdef ENABLE_LOGGING_AND_PROFILING
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);
(...skipping 24 matching lines...) Expand all
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_
OLDNEW
« no previous file with comments | « src/log-inl.h ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698