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

Unified Diff: src/compiler/arm/unwinding-info-writer-arm.h

Issue 2026313002: Emit unwinding information for TurboFan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@eh-frame
Patch Set: MarkFrameConstructed inside has_frame branch on ARM. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/arm/unwinding-info-writer-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/arm/unwinding-info-writer-arm.h
diff --git a/src/compiler/arm/unwinding-info-writer-arm.h b/src/compiler/arm/unwinding-info-writer-arm.h
new file mode 100644
index 0000000000000000000000000000000000000000..d47ca083ae077d84039f9c6c42b15dd602cbd0d3
--- /dev/null
+++ b/src/compiler/arm/unwinding-info-writer-arm.h
@@ -0,0 +1,72 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_ARM_UNWINDING_INFO_WRITER_H_
+#define V8_COMPILER_ARM_UNWINDING_INFO_WRITER_H_
+
+#include "src/eh-frame.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class InstructionBlock;
+
+class UnwindingInfoWriter {
+ public:
+ explicit UnwindingInfoWriter(Zone* zone)
+ : zone_(zone),
+ eh_frame_writer_(zone),
+ saved_lr_(false),
+ block_will_exit_(false),
+ block_initial_states_(zone) {
+ if (enabled()) eh_frame_writer_.Initialize();
+ }
+
+ void SetNumberOfInstructionBlocks(int number) {
+ if (enabled()) block_initial_states_.resize(number);
+ }
+
+ void BeginInstructionBlock(int pc_offset, const InstructionBlock* block);
+ void EndInstructionBlock(const InstructionBlock* block);
+
+ void MarkLinkRegisterOnTopOfStack(int pc_offset);
+ void MarkPopLinkRegisterFromTopOfStack(int pc_offset);
+
+ void MarkFrameConstructed(int at_pc);
+ void MarkFrameDeconstructed(int at_pc);
+
+ void MarkBlockWillExit() { block_will_exit_ = true; }
+
+ void Finish(int code_size) {
+ if (enabled()) eh_frame_writer_.Finish(code_size);
+ }
+
+ EhFrameWriter* eh_frame_writer() {
+ return enabled() ? &eh_frame_writer_ : nullptr;
+ }
+
+ private:
+ bool enabled() const { return FLAG_perf_prof_unwinding_info; }
+
+ class BlockInitialState : public ZoneObject {
+ public:
+ explicit BlockInitialState(bool saved_lr) : saved_lr_(saved_lr) {}
+
+ bool saved_lr_;
+ };
+
+ Zone* zone_;
+ EhFrameWriter eh_frame_writer_;
+ bool saved_lr_;
+ bool block_will_exit_;
+
+ ZoneVector<const BlockInitialState*> block_initial_states_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/arm/unwinding-info-writer-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698