From patchwork Wed Jul 18 09:45:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harsh Prateek Bora X-Patchwork-Id: 171620 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7E1EE2C0341 for ; Wed, 18 Jul 2012 19:47:32 +1000 (EST) Received: from localhost ([::1]:50381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrQqw-0007aK-MQ for incoming@patchwork.ozlabs.org; Wed, 18 Jul 2012 05:47:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrQqT-0006SE-Fm for qemu-devel@nongnu.org; Wed, 18 Jul 2012 05:47:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrQqL-0004ud-A7 for qemu-devel@nongnu.org; Wed, 18 Jul 2012 05:47:01 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:52039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrQqK-0004uF-ON for qemu-devel@nongnu.org; Wed, 18 Jul 2012 05:46:53 -0400 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Jul 2012 09:40:36 +1000 Received: from d23relay03.au.ibm.com (202.81.31.245) by e23smtp05.au.ibm.com (202.81.31.211) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Jul 2012 09:40:11 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6I9kMKh8389028 for ; Wed, 18 Jul 2012 19:46:23 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6I9kMCh025432 for ; Wed, 18 Jul 2012 19:46:22 +1000 Received: from harshbora.in.ibm.com.com ([9.79.178.168]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6I9kILF025311; Wed, 18 Jul 2012 19:46:20 +1000 From: Harsh Prateek Bora To: stefanha@gmail.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Date: Wed, 18 Jul 2012 15:15:58 +0530 Message-Id: <1342604760-7672-2-git-send-email-harsh@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1342604760-7672-1-git-send-email-harsh@linux.vnet.ibm.com> References: <1342604760-7672-1-git-send-email-harsh@linux.vnet.ibm.com> x-cbid: 12071723-1396-0000-0000-00000192DD7F X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.81.31.147 Cc: Harsh Prateek Bora Subject: [Qemu-devel] [PATCH v8 1/3] monitor: remove unused do_info_trace X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Going forward with simpletrace v2 variable size trace records, we cannot have a generic function to print trace event info and therefore this interface becomes invalid. As per Stefan Hajnoczi: "This command is only available from the human monitor. It's not very useful because it historically hasn't been able to pretty-print events or show them in the right order (we use a ringbuffer but it prints them out from index 0). Therefore, I don't think we're under any obligation to keep this command around. No one has complained about it's limitations - I think this is a sign that no one has used it. I'd be okay with a patch that removes it." Ref: http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01268.html Signed-off-by: Harsh Prateek Bora --- monitor.c | 16 ---------------- trace/simple.c | 18 ------------------ trace/simple.h | 1 - 3 files changed, 35 deletions(-) diff --git a/monitor.c b/monitor.c index a3bc2c7..1fb00ab 100644 --- a/monitor.c +++ b/monitor.c @@ -795,13 +795,6 @@ static void do_info_cpu_stats(Monitor *mon) } #endif -#if defined(CONFIG_TRACE_SIMPLE) -static void do_info_trace(Monitor *mon) -{ - st_print_trace((FILE *)mon, &monitor_fprintf); -} -#endif - static void do_trace_print_events(Monitor *mon) { trace_print_events((FILE *)mon, &monitor_fprintf); @@ -2568,15 +2561,6 @@ static mon_cmd_t info_cmds[] = { .help = "show roms", .mhandler.info = do_info_roms, }, -#if defined(CONFIG_TRACE_SIMPLE) - { - .name = "trace", - .args_type = "", - .params = "", - .help = "show current contents of trace buffer", - .mhandler.info = do_info_trace, - }, -#endif { .name = "trace-events", .args_type = "", diff --git a/trace/simple.c b/trace/simple.c index b4a3c6e..b64bcf4 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -291,24 +291,6 @@ void st_print_trace_file_status(FILE *stream, int (*stream_printf)(FILE *stream, trace_file_name, trace_fp ? "on" : "off"); } -void st_print_trace(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...)) -{ - unsigned int i; - - for (i = 0; i < TRACE_BUF_LEN; i++) { - TraceRecord record; - - if (!get_trace_record(i, &record)) { - continue; - } - stream_printf(stream, "Event %" PRIu64 " : %" PRIx64 " %" PRIx64 - " %" PRIx64 " %" PRIx64 " %" PRIx64 " %" PRIx64 "\n", - record.event, record.x1, record.x2, - record.x3, record.x4, record.x5, - record.x6); - } -} - void st_flush_trace_buffer(void) { flush_trace_file(true); diff --git a/trace/simple.h b/trace/simple.h index 466e75b..6b5358c 100644 --- a/trace/simple.h +++ b/trace/simple.h @@ -29,7 +29,6 @@ void trace3(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3); void trace4(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4); void trace5(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5); void trace6(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5, uint64_t x6); -void st_print_trace(FILE *stream, fprintf_function stream_printf); void st_print_trace_file_status(FILE *stream, fprintf_function stream_printf); void st_set_trace_file_enabled(bool enable); bool st_set_trace_file(const char *file);