From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22396 invoked by alias); 9 Mar 2009 21:10:17 -0000 Received: (qmail 22388 invoked by uid 22791); 9 Mar 2009 21:10:16 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Mar 2009 21:10:11 +0000 Received: (qmail 13473 invoked from network); 9 Mar 2009 21:10:09 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Mar 2009 21:10:09 -0000 From: Vladimir Prus To: gdb-patches@sources.redhat.com, Nick Roberts Subject: [RFC] Fix MI timings Date: Mon, 09 Mar 2009 21:10:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.65; i686; svn-936416; 2009-03-07) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200903100010.06180.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00126.txt.bz2 I've noticed that -enable-timings produces broken output for all commands that resume target. First, we output *stopped. And them on a separate line we print the timing, like this: ,time={wallclock="0.32046",user="0.32000",system="0.00000"} (gdb) This happens because mi_on_normal_stop does print newline, and then mi_execute_async_cli_command does timings separately. This patch: 1. Make mi_on_normal_stop emit the timing info 2. Stop mi_execute_async_cli_command from doing so 3. Makes captured_mi_execute_command report timing both to MI and CLI code paths. I'll commit this in a few days if there are no objections. - Volodya