v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
unwinding-info-writer-arm.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_COMPILER_BACKEND_ARM_UNWINDING_INFO_WRITER_ARM_H_
6#define V8_COMPILER_BACKEND_ARM_UNWINDING_INFO_WRITER_ARM_H_
7
9#include "src/flags/flags.h"
10
11namespace v8 {
12namespace internal {
13namespace compiler {
14
15class InstructionBlock;
16
17class UnwindingInfoWriter {
18 public:
19 explicit UnwindingInfoWriter(Zone* zone)
20 : zone_(zone),
21 eh_frame_writer_(zone),
22 saved_lr_(false),
23 block_will_exit_(false),
26 }
27
29 if (enabled()) block_initial_states_.resize(number);
30 }
31
32 void BeginInstructionBlock(int pc_offset, const InstructionBlock* block);
33 void EndInstructionBlock(const InstructionBlock* block);
34
37
38 void MarkFrameConstructed(int at_pc);
39 void MarkFrameDeconstructed(int at_pc);
40
42
43 void Finish(int code_size) {
44 if (enabled()) eh_frame_writer_.Finish(code_size);
45 }
46
48 return enabled() ? &eh_frame_writer_ : nullptr;
49 }
50
51 private:
52 bool enabled() const { return v8_flags.perf_prof_unwinding_info; }
53
54 class BlockInitialState : public ZoneObject {
55 public:
56 explicit BlockInitialState(bool saved_lr) : saved_lr_(saved_lr) {}
57
59 };
60
65
67};
68
69} // namespace compiler
70} // namespace internal
71} // namespace v8
72
73#endif // V8_COMPILER_BACKEND_ARM_UNWINDING_INFO_WRITER_ARM_H_
void Finish(int code_size)
Definition eh-frame.cc:349
ZoneVector< const BlockInitialState * > block_initial_states_
void BeginInstructionBlock(int pc_offset, const InstructionBlock *block)
void EndInstructionBlock(const InstructionBlock *block)
int pc_offset
V8_EXPORT_PRIVATE FlagValues v8_flags