| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 #if V8_OS_LINUX | 43 #if V8_OS_LINUX |
| 44 | 44 |
| 45 // Linux perf tool logging support | 45 // Linux perf tool logging support |
| 46 class PerfJitLogger : public CodeEventLogger { | 46 class PerfJitLogger : public CodeEventLogger { |
| 47 public: | 47 public: |
| 48 PerfJitLogger(); | 48 PerfJitLogger(); |
| 49 virtual ~PerfJitLogger(); | 49 virtual ~PerfJitLogger(); |
| 50 | 50 |
| 51 virtual void CodeMoveEvent(Address from, Address to); | 51 virtual void CodeMoveEvent(Address from, Address to); |
| 52 virtual void CodeDeleteEvent(Address from); | |
| 53 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) {} | 52 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) {} |
| 54 virtual void SnapshotPositionEvent(Address addr, int pos); | 53 virtual void SnapshotPositionEvent(Address addr, int pos); |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 uint64_t GetTimestamp(); | 56 uint64_t GetTimestamp(); |
| 58 virtual void LogRecordedBuffer(Code* code, SharedFunctionInfo* shared, | 57 virtual void LogRecordedBuffer(Code* code, SharedFunctionInfo* shared, |
| 59 const char* name, int length); | 58 const char* name, int length); |
| 60 | 59 |
| 61 // Extension added to V8 log file name to get the low-level log name. | 60 // Extension added to V8 log file name to get the low-level log name. |
| 62 static const char kFilenameFormatString[]; | 61 static const char kFilenameFormatString[]; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 93 uint64_t code_index_; | 92 uint64_t code_index_; |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 #else | 95 #else |
| 97 | 96 |
| 98 // PerfJitLogger is only implemented on Linux | 97 // PerfJitLogger is only implemented on Linux |
| 99 class PerfJitLogger : public CodeEventLogger { | 98 class PerfJitLogger : public CodeEventLogger { |
| 100 public: | 99 public: |
| 101 virtual void CodeMoveEvent(Address from, Address to) { UNIMPLEMENTED(); } | 100 virtual void CodeMoveEvent(Address from, Address to) { UNIMPLEMENTED(); } |
| 102 | 101 |
| 103 virtual void CodeDeleteEvent(Address from) { UNIMPLEMENTED(); } | |
| 104 | |
| 105 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { | 102 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { |
| 106 UNIMPLEMENTED(); | 103 UNIMPLEMENTED(); |
| 107 } | 104 } |
| 108 | 105 |
| 109 virtual void SnapshotPositionEvent(Address addr, int pos) { UNIMPLEMENTED(); } | 106 virtual void SnapshotPositionEvent(Address addr, int pos) { UNIMPLEMENTED(); } |
| 110 | 107 |
| 111 virtual void LogRecordedBuffer(Code* code, SharedFunctionInfo* shared, | 108 virtual void LogRecordedBuffer(Code* code, SharedFunctionInfo* shared, |
| 112 const char* name, int length) { | 109 const char* name, int length) { |
| 113 UNIMPLEMENTED(); | 110 UNIMPLEMENTED(); |
| 114 } | 111 } |
| 115 }; | 112 }; |
| 116 | 113 |
| 117 #endif // V8_OS_LINUX | 114 #endif // V8_OS_LINUX |
| 118 } | 115 } |
| 119 } // namespace v8::internal | 116 } // namespace v8::internal |
| 120 #endif | 117 #endif |
| OLD | NEW |