From 4ccddeb137659f4ba77dee40df638d4f6d182000 Mon Sep 17 00:00:00 2001 From: Michael Lenz Date: Fri, 17 Jan 2014 13:41:28 +0100 Subject: [PATCH] prune-trace: use the first write pilot instead of any In some cases the write-pilot is located at the upper boundary of the experiment and thus is in a race situation with the experiment's end. If the experiment's end occurs first, the campaign ends and complains about missing data, otherwise everything is fine. This patch circumvents this via using "the first" writing pilot; iff the only write is located at the experiment's end, the race will still occur, but cleverly written experiment code can, according to hsc, circumvent it. Change-Id: I6a27a8c4770c04ea8dcaef8aa7bd85d18f43f0b5 --- tools/prune-trace/BasicPruner.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/prune-trace/BasicPruner.cc b/tools/prune-trace/BasicPruner.cc index cb2917d9..263fcd93 100644 --- a/tools/prune-trace/BasicPruner.cc +++ b/tools/prune-trace/BasicPruner.cc @@ -35,6 +35,7 @@ bool BasicPruner::prune_all() { " data_address, width, " << m_method_id << " " "FROM trace " "WHERE variant_id = " << row[0] << " AND accesstype = 'W' " + "ORDER BY instr2 ASC " "LIMIT 1"; if (!db->query(ss.str().c_str())) return false; ss.str("");