From 57e4541190024102fca650ddf6b4d136faf3f1b3 Mon Sep 17 00:00:00 2001 From: Christoph Borchert Date: Thu, 18 Dec 2014 12:51:32 +0100 Subject: [PATCH] prune-trace: do not sort ECs for sampling Sorting is too costly for large data sets, and not worth the sampling-process speedup. Change-Id: I622ff3ed9b352fc5c7586f9733d830be727b6a11 --- tools/prune-trace/FESamplingPruner.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/prune-trace/FESamplingPruner.cc b/tools/prune-trace/FESamplingPruner.cc index 431adb86..3ce7d609 100644 --- a/tools/prune-trace/FESamplingPruner.cc +++ b/tools/prune-trace/FESamplingPruner.cc @@ -102,8 +102,7 @@ bool FESamplingPruner::sampling_prune(const fail::Database::Variant& variant) ss << "SELECT instr2, instr2_absolute, data_address, time2-time1+1 AS duration" << " FROM trace" << " WHERE variant_id = " << variant.id - << " AND accesstype = 'R'" - << " ORDER BY duration DESC"; // speeds up sampling, but query may be slow + << " AND accesstype = 'R'"; res = db->query_stream(ss.str().c_str()); ss.str(""); if (!res) return false; @@ -129,8 +128,7 @@ bool FESamplingPruner::sampling_prune(const fail::Database::Variant& variant) << " ON t.variant_id = p.variant_id AND t.data_address = p.data_address AND t.instr2 = p.instr2" << " WHERE p.fspmethod_id = " << db->get_fspmethod_id("basic") << " AND p.variant_id = " << variant.id - << " AND p.known_outcome = 0" - << " ORDER BY duration DESC"; // speeds up sampling, but query may be slow + << " AND p.known_outcome = 0"; res = db->query_stream(ss.str().c_str()); ss.str(""); if (!res) return false;