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

Side by Side Diff: src/objects.h

Issue 1728593002: [Interpreter] Add support for cpu profiler logging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 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.cc ('k') | src/objects.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 5386 matching lines...) Expand 10 before | Expand all | Expand 10 after
5397 // Code aging -- platform-specific 5397 // Code aging -- platform-specific
5398 static void PatchPlatformCodeAge(Isolate* isolate, 5398 static void PatchPlatformCodeAge(Isolate* isolate,
5399 byte* sequence, Age age, 5399 byte* sequence, Age age,
5400 MarkingParity parity); 5400 MarkingParity parity);
5401 5401
5402 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); 5402 DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
5403 }; 5403 };
5404 5404
5405 class AbstractCode : public HeapObject { 5405 class AbstractCode : public HeapObject {
5406 public: 5406 public:
5407 // All code kinds and INTERPRETED_FUNCTION.
5408 enum Kind {
5409 #define DEFINE_CODE_KIND_ENUM(name) name,
5410 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM)
5411 #undef DEFINE_CODE_KIND_ENUM
5412 INTERPRETED_FUNCTION,
5413 };
5414
5407 int SourcePosition(int offset); 5415 int SourcePosition(int offset);
5408 int SourceStatementPosition(int offset); 5416 int SourceStatementPosition(int offset);
5409 5417
5418 // Returns the address of the first instruction.
5419 inline Address instruction_start();
5420
5421 // Returns the address right after the last instruction.
5422 inline Address instruction_end();
5423
5424 // Returns the of the code instructions.
5425 inline int instruction_size();
5426
5427 // Returns true if pc is inside this object's instructions.
5428 inline bool contains(byte* pc);
5429
5430 // Returns the AbstractCode::Kind of the code.
5431 inline Kind kind();
5432
5433 // Calculate the size of the code object to report for log events. This takes
5434 // the layout of the code object into account.
5435 inline int ExecutableSize();
5436
5410 DECLARE_CAST(AbstractCode) 5437 DECLARE_CAST(AbstractCode)
5411 inline int Size();
5412 inline Code* GetCode(); 5438 inline Code* GetCode();
5413 inline BytecodeArray* GetBytecodeArray(); 5439 inline BytecodeArray* GetBytecodeArray();
5414 }; 5440 };
5415 5441
5416 // Dependent code is a singly linked list of fixed arrays. Each array contains 5442 // Dependent code is a singly linked list of fixed arrays. Each array contains
5417 // code objects in weak cells for one dependent group. The suffix of the array 5443 // code objects in weak cells for one dependent group. The suffix of the array
5418 // can be filled with the undefined value if the number of codes is less than 5444 // can be filled with the undefined value if the number of codes is less than
5419 // the length of the array. 5445 // the length of the array.
5420 // 5446 //
5421 // +------+-----------------+--------+--------+-----+--------+-----------+-----+ 5447 // +------+-----------------+--------+--------+-----+--------+-----------+-----+
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
6599 // SharedFunctionInfo describes the JSFunction information that can be 6625 // SharedFunctionInfo describes the JSFunction information that can be
6600 // shared by multiple instances of the function. 6626 // shared by multiple instances of the function.
6601 class SharedFunctionInfo: public HeapObject { 6627 class SharedFunctionInfo: public HeapObject {
6602 public: 6628 public:
6603 // [name]: Function name. 6629 // [name]: Function name.
6604 DECL_ACCESSORS(name, Object) 6630 DECL_ACCESSORS(name, Object)
6605 6631
6606 // [code]: Function code. 6632 // [code]: Function code.
6607 DECL_ACCESSORS(code, Code) 6633 DECL_ACCESSORS(code, Code)
6608 6634
6635 // Get the abstract code associated with the function, which will either be
6636 // a Code object or a BytecodeArray.
6637 inline AbstractCode* abstract_code();
6638
6609 inline void ReplaceCode(Code* code); 6639 inline void ReplaceCode(Code* code);
6610 6640
6611 // [optimized_code_map]: Map from native context to optimized code 6641 // [optimized_code_map]: Map from native context to optimized code
6612 // and a shared literals array. 6642 // and a shared literals array.
6613 DECL_ACCESSORS(optimized_code_map, FixedArray) 6643 DECL_ACCESSORS(optimized_code_map, FixedArray)
6614 6644
6615 // Returns entry from optimized code map for specified context and OSR entry. 6645 // Returns entry from optimized code map for specified context and OSR entry.
6616 // Note that {code == nullptr, literals == nullptr} indicates no matching 6646 // Note that {code == nullptr, literals == nullptr} indicates no matching
6617 // entry has been found, whereas {code, literals == nullptr} indicates that 6647 // entry has been found, whereas {code, literals == nullptr} indicates that
6618 // code is context-independent. 6648 // code is context-independent.
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
7435 7465
7436 // [code]: The generated code object for this function. Executed 7466 // [code]: The generated code object for this function. Executed
7437 // when the function is invoked, e.g. foo() or new foo(). See 7467 // when the function is invoked, e.g. foo() or new foo(). See
7438 // [[Call]] and [[Construct]] description in ECMA-262, section 7468 // [[Call]] and [[Construct]] description in ECMA-262, section
7439 // 8.6.2, page 27. 7469 // 8.6.2, page 27.
7440 inline Code* code(); 7470 inline Code* code();
7441 inline void set_code(Code* code); 7471 inline void set_code(Code* code);
7442 inline void set_code_no_write_barrier(Code* code); 7472 inline void set_code_no_write_barrier(Code* code);
7443 inline void ReplaceCode(Code* code); 7473 inline void ReplaceCode(Code* code);
7444 7474
7475 // Get the abstract code associated with the function, which will either be
7476 // a Code object or a BytecodeArray.
7477 inline AbstractCode* abstract_code();
7478
7445 // Tells whether this function inlines the given shared function info. 7479 // Tells whether this function inlines the given shared function info.
7446 bool Inlines(SharedFunctionInfo* candidate); 7480 bool Inlines(SharedFunctionInfo* candidate);
7447 7481
7448 // Tells whether or not this function has been optimized. 7482 // Tells whether or not this function has been optimized.
7449 inline bool IsOptimized(); 7483 inline bool IsOptimized();
7450 7484
7451 // Mark this function for lazy recompilation. The function will be 7485 // Mark this function for lazy recompilation. The function will be
7452 // recompiled the next time it is executed. 7486 // recompiled the next time it is executed.
7453 void MarkForOptimization(); 7487 void MarkForOptimization();
7454 void AttemptConcurrentOptimization(); 7488 void AttemptConcurrentOptimization();
(...skipping 3384 matching lines...) Expand 10 before | Expand all | Expand 10 after
10839 } 10873 }
10840 return value; 10874 return value;
10841 } 10875 }
10842 }; 10876 };
10843 10877
10844 10878
10845 } // NOLINT, false-positive due to second-order macros. 10879 } // NOLINT, false-positive due to second-order macros.
10846 } // NOLINT, false-positive due to second-order macros. 10880 } // NOLINT, false-positive due to second-order macros.
10847 10881
10848 #endif // V8_OBJECTS_H_ 10882 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698