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/perf-jit.cc

Issue 960493003: Remove JITCodeEvent::CODE_REMOVED (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 9 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/perf-jit.h ('k') | src/serialize.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 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 LogWriteBytes(reinterpret_cast<const char*>(code_pointer), code_size); 107 LogWriteBytes(reinterpret_cast<const char*>(code_pointer), code_size);
108 } 108 }
109 109
110 110
111 void PerfJitLogger::CodeMoveEvent(Address from, Address to) { 111 void PerfJitLogger::CodeMoveEvent(Address from, Address to) {
112 // Code relocation not supported. 112 // Code relocation not supported.
113 UNREACHABLE(); 113 UNREACHABLE();
114 } 114 }
115 115
116 116
117 void PerfJitLogger::CodeDeleteEvent(Address from) {
118 // V8 does not send notification on code unload
119 }
120
121
122 void PerfJitLogger::SnapshotPositionEvent(Address addr, int pos) {} 117 void PerfJitLogger::SnapshotPositionEvent(Address addr, int pos) {}
123 118
124 119
125 void PerfJitLogger::LogWriteBytes(const char* bytes, int size) { 120 void PerfJitLogger::LogWriteBytes(const char* bytes, int size) {
126 size_t rv = fwrite(bytes, 1, size, perf_output_handle_); 121 size_t rv = fwrite(bytes, 1, size, perf_output_handle_);
127 DCHECK(static_cast<size_t>(size) == rv); 122 DCHECK(static_cast<size_t>(size) == rv);
128 USE(rv); 123 USE(rv);
129 } 124 }
130 125
131 126
132 void PerfJitLogger::LogWriteHeader() { 127 void PerfJitLogger::LogWriteHeader() {
133 DCHECK(perf_output_handle_ != NULL); 128 DCHECK(perf_output_handle_ != NULL);
134 jitheader header; 129 jitheader header;
135 header.magic = JITHEADER_MAGIC; 130 header.magic = JITHEADER_MAGIC;
136 header.version = JITHEADER_VERSION; 131 header.version = JITHEADER_VERSION;
137 header.total_size = sizeof(jitheader); 132 header.total_size = sizeof(jitheader);
138 header.pad1 = 0xdeadbeef; 133 header.pad1 = 0xdeadbeef;
139 header.elf_mach = GetElfMach(); 134 header.elf_mach = GetElfMach();
140 header.pid = base::OS::GetCurrentProcessId(); 135 header.pid = base::OS::GetCurrentProcessId();
141 header.timestamp = 136 header.timestamp =
142 static_cast<uint64_t>(base::OS::TimeCurrentMillis() * 1000.0); 137 static_cast<uint64_t>(base::OS::TimeCurrentMillis() * 1000.0);
143 LogWriteBytes(reinterpret_cast<const char*>(&header), sizeof(header)); 138 LogWriteBytes(reinterpret_cast<const char*>(&header), sizeof(header));
144 } 139 }
145 140
146 #endif // V8_OS_LINUX 141 #endif // V8_OS_LINUX
147 } 142 }
148 } // namespace v8::internal 143 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/perf-jit.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698