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

Side by Side Diff: src/platform.h

Issue 113939: Tiny fix: initialize TickSample::frames_count with 0. (Closed)
Patch Set: Created 11 years, 6 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 | « no previous file | 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 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 // ---------------------------------------------------------------------------- 486 // ----------------------------------------------------------------------------
487 // Sampler 487 // Sampler
488 // 488 //
489 // A sampler periodically samples the state of the VM and optionally 489 // A sampler periodically samples the state of the VM and optionally
490 // (if used for profiling) the program counter and stack pointer for 490 // (if used for profiling) the program counter and stack pointer for
491 // the thread that created it. 491 // the thread that created it.
492 492
493 // TickSample captures the information collected for each sample. 493 // TickSample captures the information collected for each sample.
494 class TickSample { 494 class TickSample {
495 public: 495 public:
496 TickSample() : pc(0), sp(0), fp(0), state(OTHER) {} 496 TickSample() : pc(0), sp(0), fp(0), state(OTHER), frames_count(0) {}
497 uintptr_t pc; // Instruction pointer. 497 uintptr_t pc; // Instruction pointer.
498 uintptr_t sp; // Stack pointer. 498 uintptr_t sp; // Stack pointer.
499 uintptr_t fp; // Frame pointer. 499 uintptr_t fp; // Frame pointer.
500 StateTag state; // The state of the VM. 500 StateTag state; // The state of the VM.
501 static const int kMaxFramesCount = 100; 501 static const int kMaxFramesCount = 100;
502 EmbeddedVector<Address, kMaxFramesCount> stack; // Call stack. 502 EmbeddedVector<Address, kMaxFramesCount> stack; // Call stack.
503 int frames_count; // Number of captured frames. 503 int frames_count; // Number of captured frames.
504 }; 504 };
505 505
506 class Sampler { 506 class Sampler {
(...skipping 24 matching lines...) Expand all
531 bool active_; 531 bool active_;
532 PlatformData* data_; // Platform specific data. 532 PlatformData* data_; // Platform specific data.
533 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 533 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
534 }; 534 };
535 535
536 #endif // ENABLE_LOGGING_AND_PROFILING 536 #endif // ENABLE_LOGGING_AND_PROFILING
537 537
538 } } // namespace v8::internal 538 } } // namespace v8::internal
539 539
540 #endif // V8_PLATFORM_H_ 540 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698