ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
VariableValueLogger.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5// LICENSE file.
6
7#ifndef ETISS_PLUGIN_VVLOGGER_H_
8#define ETISS_PLUGIN_VVLOGGER_H_
9
10#include "etiss/Misc.h"
11#include "etiss/Plugin.h"
12
13#include <fstream>
14
15namespace etiss
16{
17
18namespace plugin
19{
20
26{
27 public:
28 VariableValueLogger(const std::string &field, const std::string &file,
29 std::function<void(std::ostream &out, const std::string &field, uint64_t value)> writer);
30 virtual void initCodeBlock(etiss::CodeBlock &block) const;
32
33 public:
36 void writeValue();
37
38 protected:
41 virtual std::string _getPluginName() const;
42
43 private:
44 std::string field_;
52 std::function<void(std::ostream &out, const std::string &field, uint64_t value)> writer_;
53 std::ofstream out_;
54};
55
56} // namespace plugin
57
58} // namespace etiss
59
60#endif
general configuration and logging
plugins for extensions to code translation and instruction execution
static __inline__ uint64_t
Definition arm_cde.h:31
A list of CodeSets.
Definition CodePart.h:532
allows to add code to the translation of instructions
Definition Plugin.h:222
holds etiss::instr::VariableInstructionSet instances for different modes.
writes the value of a field before each instruction
std::ofstream out_
file stream for logger.
virtual std::string _getPluginName() const
returns the name of the Plugin.
virtual void initCodeBlock(etiss::CodeBlock &block) const
called before instructions are translated for the code block
void writeValue()
Calls the function specified with writer_ to log the variable.
std::function< void(std::ostream &out, const std::string &field, uint64_t value)> writer_
Function which specifies the outout format.
virtual void finalizeInstrSet(etiss::instr::ModedInstructionSet &) const
called after all instructions have been added to allow last changes
std::string field_
Name of the field to log.
forwards: include/jit/*
Definition Benchmark.h:17