From 65361948ca7975553757a0e0df4ac7352413044c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 14 May 2015 16:04:45 -0700 Subject: 1376 - update github docs --- html/003trace.cc.html | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'html/003trace.cc.html') diff --git a/html/003trace.cc.html b/html/003trace.cc.html index cf44c85e..9e98eba5 100644 --- a/html/003trace.cc.html +++ b/html/003trace.cc.html @@ -2,7 +2,7 @@ -Mu - 003trace.cc +~/Desktop/s/mu/003trace.cc @@ -151,6 +151,7 @@ struct trace_stream { past_lines.push_back(pair<string, pair<int, string> >(curr_layer, pair<int, string>(frame[curr_layer], curr_contents))); if (curr_layer == dump_layer || curr_layer == "dump" || dump_layer == "all" || (!Hide_warnings && curr_layer == "warn")) +//? if (dump_layer == "all" && (Current_routine->id == 3 || curr_layer == "schedule")) //? 1 cerr << curr_layer << '/' << frame[curr_layer] << ": " << curr_contents << '\n'; delete curr_stream; curr_stream = NULL; @@ -249,12 +250,12 @@ void trace_all(const string& label(string FUNCTION, string FILE, int LINE, string expected) { // missing layer == anywhere, frame, hierarchical layers vector<string> expected_lines = split(expected, "^D"); index_t curr_expected_line = 0; - while (curr_expected_line < expected_lines.size() && expected_lines[curr_expected_line].empty()) + while (curr_expected_line < expected_lines.size() && expected_lines.at(curr_expected_line).empty()) ++curr_expected_line; if (curr_expected_line == expected_lines.size()) return true; Trace_stream->newline(); string layer, frame, contents; - parse_layer_frame_contents(expected_lines[curr_expected_line], &layer, &frame, &contents); + parse_layer_frame_contents(expected_lines.at(curr_expected_line), &layer, &frame, &contents); for (vector<pair<string, pair<int, string> > >::iterator p = Trace_stream->past_lines.begin(); p != Trace_stream->past_lines.end(); ++p) { if (!layer.empty() && !prefix_match(layer, p->first)) continue; @@ -266,14 +267,14 @@ bool check_trace_contents(string FUNCTIONcontinue; ++curr_expected_line; - while (curr_expected_line < expected_lines.size() && expected_lines[curr_expected_line].empty()) + while (curr_expected_line < expected_lines.size() && expected_lines.at(curr_expected_line).empty()) ++curr_expected_line; if (curr_expected_line == expected_lines.size()) return true; - parse_layer_frame_contents(expected_lines[curr_expected_line], &layer, &frame, &contents); + parse_layer_frame_contents(expected_lines.at(curr_expected_line), &layer, &frame, &contents); } ++Num_failures; - cerr << "\nF " << FUNCTION << "(" << FILE << ":" << LINE << "): missing [" << contents << "] in trace:\n"; + cerr << "\nF - " << FUNCTION << "(" << FILE << ":" << LINE << "): missing [" << contents << "] in trace:\n"; DUMP(layer); Passed = false; return false; @@ -315,7 +316,7 @@ void parse_layer_and_frame(const string& orig bool check_trace_contents(string FUNCTION, string FILE, int LINE, string layer, string expected) { // empty layer == everything, multiple layers, hierarchical layers vector<string> expected_lines = split(expected, "^D"); index_t curr_expected_line = 0; - while (curr_expected_line < expected_lines.size() && expected_lines[curr_expected_line].empty()) + while (curr_expected_line < expected_lines.size() && expected_lines.at(curr_expected_line).empty()) ++curr_expected_line; if (curr_expected_line == expected_lines.size()) return true; Trace_stream->newline(); @@ -323,16 +324,16 @@ bool check_trace_contents(string FUNCTION(vector<pair<string, pair<int, string> > >::iterator p = Trace_stream->past_lines.begin(); p != Trace_stream->past_lines.end(); ++p) { if (!layer.empty() && !any_prefix_match(layers, p->first)) continue; - if (p->second.second != expected_lines[curr_expected_line]) + if (p->second.second != expected_lines.at(curr_expected_line)) continue; ++curr_expected_line; - while (curr_expected_line < expected_lines.size() && expected_lines[curr_expected_line].empty()) + while (curr_expected_line < expected_lines.size() && expected_lines.at(curr_expected_line).empty()) ++curr_expected_line; if (curr_expected_line == expected_lines.size()) return true; } ++Num_failures; - cerr << "\nF " << FUNCTION << "(" << FILE << ":" << LINE << "): missing [" << expected_lines[curr_expected_line] << "] in trace:\n"; + cerr << "\nF - " << FUNCTION << "(" << FILE << ":" << LINE << "): missing [" << expected_lines.at(curr_expected_line) << "] in trace:\n"; DUMP(layer); Passed = false; return false; @@ -372,7 +373,7 @@ int trace_count(string layer#define CHECK_TRACE_DOESNT_WARN() \ if (trace_count("warn") > 0) { \ ++Num_failures; \ - cerr << "\nF " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): unexpected warnings\n"; \ + cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): unexpected warnings\n"; \ DUMP("warn"); \ Passed = false; \ return; \ @@ -384,7 +385,7 @@ bool trace_doesnt_contain(string layer(string expected) { vector<string> tmp = split(expected, ": "); - return trace_doesnt_contain(tmp[0], tmp[1]); + return trace_doesnt_contain(tmp.at(0), tmp.at(1)); } bool trace_doesnt_contain(string layer, int frame, string line) { @@ -414,7 +415,7 @@ struct lease_trace_frame { bool check_trace_contents(string FUNCTION, string FILE, int LINE, string layer, int frame, string expected) { // multiple layers, hierarchical layers vector<string> expected_lines = split(expected, "^D"); // hack: doesn't handle newlines in embedded in lines index_t curr_expected_line = 0; - while (curr_expected_line < expected_lines.size() && expected_lines[curr_expected_line].empty()) + while (curr_expected_line < expected_lines.size() && expected_lines.at(curr_expected_line).empty()) ++curr_expected_line; if (curr_expected_line == expected_lines.size()) return true; Trace_stream->newline(); @@ -424,16 +425,16 @@ bool check_trace_contents(string FUNCTIONcontinue; if (p->second.first != frame) continue; - if (p->second.second != expected_lines[curr_expected_line]) + if (p->second.second != expected_lines.at(curr_expected_line)) continue; ++curr_expected_line; - while (curr_expected_line < expected_lines.size() && expected_lines[curr_expected_line].empty()) + while (curr_expected_line < expected_lines.size() && expected_lines.at(curr_expected_line).empty()) ++curr_expected_line; if (curr_expected_line == expected_lines.size()) return true; } ++Num_failures; - cerr << "\nF " << FUNCTION << "(" << FILE << ":" << LINE << "): missing [" << expected_lines[curr_expected_line] << "] in trace/" << frame << ":\n"; + cerr << "\nF - " << FUNCTION << "(" << FILE << ":" << LINE << "): missing [" << expected_lines.at(curr_expected_line) << "] in trace/" << frame << ":\n"; DUMP(layer); Passed = false; return false; @@ -460,7 +461,7 @@ vector<string> split(string s(const vector<string>& pats, const string& needle) { if (pats.empty()) return false; - if (*pats[0].rbegin() != '/') + if (*pats.at(0).rbegin() != '/') // prefix match not requested return find(pats.begin(), pats.end(), needle) != pats.end(); // first pat ends in a '/'; assume all pats do. -- cgit 1.4.1-2-gfad0