Compare commits
3 Commits
e88f309ea2
...
bb658be3b4
Author | SHA1 | Date | |
---|---|---|---|
bb658be3b4 | |||
6579780dc9 | |||
e56bc12788 |
@@ -10,8 +10,9 @@
|
|||||||
#include <rapidjson/error/en.h>
|
#include <rapidjson/error/en.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#ifdef WITH_LZ4
|
||||||
#include <lz4frame.h>
|
#include <lz4frame.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace iss {
|
namespace iss {
|
||||||
namespace plugin {
|
namespace plugin {
|
||||||
@@ -19,6 +20,7 @@ namespace plugin {
|
|||||||
using namespace rapidjson;
|
using namespace rapidjson;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#ifdef WITH_LZ4
|
||||||
class lz4compress_steambuf: public std::streambuf {
|
class lz4compress_steambuf: public std::streambuf {
|
||||||
public:
|
public:
|
||||||
lz4compress_steambuf(const lz4compress_steambuf&) = delete;
|
lz4compress_steambuf(const lz4compress_steambuf&) = delete;
|
||||||
@@ -86,6 +88,7 @@ private:
|
|||||||
LZ4F_compressionContext_t ctx{ nullptr };
|
LZ4F_compressionContext_t ctx{ nullptr };
|
||||||
bool closed{ false };
|
bool closed{ false };
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
cov::cov(std::string const &filename)
|
cov::cov(std::string const &filename)
|
||||||
: instr_if(nullptr)
|
: instr_if(nullptr)
|
||||||
@@ -162,10 +165,10 @@ void cov::callback(instr_info_t iinfo, const exec_info& einfo) {
|
|||||||
else
|
else
|
||||||
delay = entry.not_taken;
|
delay = entry.not_taken;
|
||||||
#ifndef WITH_LZ4
|
#ifndef WITH_LZ4
|
||||||
output<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay << "\n";
|
output<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay <<"," << call<< "\n";
|
||||||
#else
|
#else
|
||||||
auto rdbuf=ostr.rdbuf();
|
auto rdbuf=ostr.rdbuf();
|
||||||
ostr<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay << "\n";
|
ostr<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay <<"," << call<< "\n";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user