From patchwork Wed Jul 10 13:46:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11038593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32E6617EF for ; Wed, 10 Jul 2019 13:47:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 256CC28900 for ; Wed, 10 Jul 2019 13:47:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1903028910; Wed, 10 Jul 2019 13:47:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 810D828915 for ; Wed, 10 Jul 2019 13:47:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727250AbfGJNr1 (ORCPT ); Wed, 10 Jul 2019 09:47:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:56242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727602AbfGJNr0 (ORCPT ); Wed, 10 Jul 2019 09:47:26 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66785208C4; Wed, 10 Jul 2019 13:47:26 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.92) (envelope-from ) id 1hlCwP-0002pX-Hu; Wed, 10 Jul 2019 09:47:25 -0400 Message-Id: <20190710134725.436998774@goodmis.org> User-Agent: quilt/0.65 Date: Wed, 10 Jul 2019 09:46:39 -0400 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: Yordan Karadzhov Subject: [PATCH 3/4] kernel-shark: Show the standard error of kshark-record References: <20190710134636.116362181@goodmis.org> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Steven Rostedt (VMware)" When kshark-record fails, report the standard error which can be very useful for debugging the issue that when wrong. For example, after removing the kshark lib functions, instead of just having "Unknow error" print when kshark-record dialog fails, I now get: /usr/local/bin/kshark-record: error while loading shared libraries: libkshark-gui.so.0.9.8: cannot open shared object file: No such file or directory Signed-off-by: Steven Rostedt (VMware) --- kernel-shark/src/KsMainWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp index 13b50795340c..54aa6d782ad1 100644 --- a/kernel-shark/src/KsMainWindow.cpp +++ b/kernel-shark/src/KsMainWindow.cpp @@ -1179,7 +1179,7 @@ void KsMainWindow::_captureFinished(int ret, QProcess::ExitStatus st) QString message = "Capture process failed:
"; message += capture->errorString(); - + message += capture->readAllStandardError(); _error(message, "captureFinishedErr", false, false); } } @@ -1190,6 +1190,7 @@ void KsMainWindow::_captureError(QProcess::ProcessError error) QString message = "Capture process failed:
"; message += capture->errorString(); + message += capture->readAllStandardError(); _error(message, "captureFinishedErr", false, false); }