aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda_dump
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-12-14 00:02:23 +0100
committerAndrzej Janik <[email protected]>2021-12-14 00:02:23 +0100
commit971951bc9e696fbf895978b864a45b2ddb56ba5b (patch)
treed680b4a162192361fa05d76e259f11915e63ad7f /zluda_dump
parent0ca14d740fcf76579d17f5b573f3f003f04592bc (diff)
downloadZLUDA-971951bc9e696fbf895978b864a45b2ddb56ba5b.tar.gz
ZLUDA-971951bc9e696fbf895978b864a45b2ddb56ba5b.zip
Improve reporting of recovered unrecognized statement/directive
Diffstat (limited to 'zluda_dump')
-rw-r--r--zluda_dump/README.md4
-rw-r--r--zluda_dump/src/trace.rs4
2 files changed, 6 insertions, 2 deletions
diff --git a/zluda_dump/README.md b/zluda_dump/README.md
index 52cecc8..1e7c03b 100644
--- a/zluda_dump/README.md
+++ b/zluda_dump/README.md
@@ -1 +1,3 @@
-sed 's/(.*//g' log.txt | sort | uniq > uniq.txt \ No newline at end of file
+grep -E '^cu.*' log.txt | sed 's/(.*//g' | sort | uniq > uniq_host.txt
+cat *.log | grep "^Unrecognized s" | grep -Eo '`([^`]*)`' | sed -E 's/^`([^[:space:]]*).*`/\1/' | sort | uniq > uniq_statements.txt
+cat *.log | grep "^Unrecognized d" | grep -Eo '`([^`]*)`' | sed -E 's/^`([^`]*)`/\1/' | sort | uniq > uniq_directives.txt \ No newline at end of file
diff --git a/zluda_dump/src/trace.rs b/zluda_dump/src/trace.rs
index eac6bbd..2afc1c5 100644
--- a/zluda_dump/src/trace.rs
+++ b/zluda_dump/src/trace.rs
@@ -177,6 +177,7 @@ impl StateTracker {
DumpWriter::get_file_name(module_index, version, submodule_index, "log"),
));
fn_logger.log_io_error(self.writer.save_module_error_log(
+ module_text,
module_index,
version,
submodule_index,
@@ -230,6 +231,7 @@ impl DumpWriter {
fn save_module_error_log<'input>(
&self,
+ module_text: &str,
module_index: usize,
version: Option<usize>,
submodule_index: Option<usize>,
@@ -247,7 +249,7 @@ impl DumpWriter {
));
let mut file = File::create(log_file)?;
for error in errors {
- let pretty_print_error = DisplayParseError("", error);
+ let pretty_print_error = unsafe { DisplayParseError::new(error, module_text) };
writeln!(file, "{}", pretty_print_error)?;
}
Ok(())