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/safepoint-table.h

Issue 43273004: Allow redirecting disassembly and deoptimization traces into a file. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/objects-printer.cc ('k') | src/safepoint-table.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 SafepointEntry GetEntry(unsigned index) const { 119 SafepointEntry GetEntry(unsigned index) const {
120 ASSERT(index < length_); 120 ASSERT(index < length_);
121 unsigned info = Memory::uint32_at(GetInfoLocation(index)); 121 unsigned info = Memory::uint32_at(GetInfoLocation(index));
122 uint8_t* bits = &Memory::uint8_at(entries_ + (index * entry_size_)); 122 uint8_t* bits = &Memory::uint8_at(entries_ + (index * entry_size_));
123 return SafepointEntry(info, bits); 123 return SafepointEntry(info, bits);
124 } 124 }
125 125
126 // Returns the entry for the given pc. 126 // Returns the entry for the given pc.
127 SafepointEntry FindEntry(Address pc) const; 127 SafepointEntry FindEntry(Address pc) const;
128 128
129 void PrintEntry(unsigned index) const; 129 void PrintEntry(unsigned index, FILE* out = stdout) const;
130 130
131 private: 131 private:
132 static const uint8_t kNoRegisters = 0xFF; 132 static const uint8_t kNoRegisters = 0xFF;
133 133
134 static const int kLengthOffset = 0; 134 static const int kLengthOffset = 0;
135 static const int kEntrySizeOffset = kLengthOffset + kIntSize; 135 static const int kEntrySizeOffset = kLengthOffset + kIntSize;
136 static const int kHeaderSize = kEntrySizeOffset + kIntSize; 136 static const int kHeaderSize = kEntrySizeOffset + kIntSize;
137 137
138 static const int kPcSize = kIntSize; 138 static const int kPcSize = kIntSize;
139 static const int kDeoptimizationIndexSize = kIntSize; 139 static const int kDeoptimizationIndexSize = kIntSize;
140 static const int kPcAndDeoptimizationIndexSize = 140 static const int kPcAndDeoptimizationIndexSize =
141 kPcSize + kDeoptimizationIndexSize; 141 kPcSize + kDeoptimizationIndexSize;
142 142
143 Address GetPcOffsetLocation(unsigned index) const { 143 Address GetPcOffsetLocation(unsigned index) const {
144 return pc_and_deoptimization_indexes_ + 144 return pc_and_deoptimization_indexes_ +
145 (index * kPcAndDeoptimizationIndexSize); 145 (index * kPcAndDeoptimizationIndexSize);
146 } 146 }
147 147
148 Address GetInfoLocation(unsigned index) const { 148 Address GetInfoLocation(unsigned index) const {
149 return GetPcOffsetLocation(index) + kPcSize; 149 return GetPcOffsetLocation(index) + kPcSize;
150 } 150 }
151 151
152 static void PrintBits(uint8_t byte, int digits); 152 static void PrintBits(FILE* out, uint8_t byte, int digits);
153 153
154 DisallowHeapAllocation no_allocation_; 154 DisallowHeapAllocation no_allocation_;
155 Code* code_; 155 Code* code_;
156 unsigned length_; 156 unsigned length_;
157 unsigned entry_size_; 157 unsigned entry_size_;
158 158
159 Address pc_and_deoptimization_indexes_; 159 Address pc_and_deoptimization_indexes_;
160 Address entries_; 160 Address entries_;
161 161
162 friend class SafepointTableBuilder; 162 friend class SafepointTableBuilder;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 int last_lazy_safepoint_; 244 int last_lazy_safepoint_;
245 245
246 Zone* zone_; 246 Zone* zone_;
247 247
248 DISALLOW_COPY_AND_ASSIGN(SafepointTableBuilder); 248 DISALLOW_COPY_AND_ASSIGN(SafepointTableBuilder);
249 }; 249 };
250 250
251 } } // namespace v8::internal 251 } } // namespace v8::internal
252 252
253 #endif // V8_SAFEPOINT_TABLE_H_ 253 #endif // V8_SAFEPOINT_TABLE_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/safepoint-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698