File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ stringparsingcheck:tests/stringparsingcheck.cpp $(HEADERS) $(LIBFILES)
113113 $(CXX ) $(CXXFLAGS ) -o stringparsingcheck tests/stringparsingcheck.cpp src/jsonioutil.cpp src/jsonparser.cpp src/stage1_find_marks.cpp -I. $(LIBFLAGS ) -DJSON_TEST_STRINGS
114114
115115
116- minifiercompetition : benchmark/minifiercompetition.cpp $(HEADERS ) $(MINIFIERHEADERS ) $(LIBFILES ) $(MINIFIERLIBFILES )
116+ minifiercompetition : benchmark/minifiercompetition.cpp $(HEADERS ) $(LIBS ) $( MINIFIERHEADERS ) $(LIBFILES ) $(MINIFIERLIBFILES )
117117 $(CXX ) $(CXXFLAGS ) -o minifiercompetition $(LIBFILES ) $(MINIFIERLIBFILES ) benchmark/minifiercompetition.cpp -I. $(LIBFLAGS ) $(COREDEPSINCLUDE )
118118
119119minify : tools/minify.cpp $(HEADERS ) $(MINIFIERHEADERS ) $(LIBFILES ) $(MINIFIERLIBFILES )
Original file line number Diff line number Diff line change 1616
1717template <int TYPE = PERF_TYPE_HARDWARE> class LinuxEvents {
1818 int fd;
19+ bool working;
1920 perf_event_attr attribs;
2021 int num_events;
2122 std::vector<uint64_t > temp_result_vec;
2223 std::vector<uint64_t > ids;
23-
2424public:
25- explicit LinuxEvents (std::vector<int > config_vec) : fd(0 ) {
25+ explicit LinuxEvents (std::vector<int > config_vec) : fd(0 ), working( true ) {
2626 memset (&attribs, 0 , sizeof (attribs));
2727 attribs.type = TYPE;
2828 attribs.size = sizeof (attribs);
@@ -83,7 +83,8 @@ template <int TYPE = PERF_TYPE_HARDWARE> class LinuxEvents {
8383
8484private:
8585 void report_error (const std::string &context) {
86- throw std::runtime_error (context + " : " + std::string (strerror (errno)));
86+ if (working) std::cerr << (context + " : " + std::string (strerror (errno))) << std::endl;
87+ working = false ;
8788 }
8889};
8990#endif
You can’t perform that action at this time.
0 commit comments