From patchwork Mon Aug 30 21:01:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 63128 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8782AB70FE for ; Tue, 31 Aug 2010 07:07:40 +1000 (EST) Received: from localhost ([127.0.0.1]:44013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqBZo-0007dl-VJ for incoming@patchwork.ozlabs.org; Mon, 30 Aug 2010 17:07:36 -0400 Received: from [140.186.70.92] (port=50244 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqBYM-0006bK-5C for qemu-devel@nongnu.org; Mon, 30 Aug 2010 17:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqBYK-000539-ED for qemu-devel@nongnu.org; Mon, 30 Aug 2010 17:06:05 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:33084) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqBYK-00052v-C4 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 17:06:04 -0400 Received: by qwh5 with SMTP id 5so5545965qwh.4 for ; Mon, 30 Aug 2010 14:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=UgxZhSmUnMgfE5XgCgV874F+oRnlIOt+IHu0zgptIto=; b=ejnfNd/R+Jrm+gmnpARGDLhidT4mTsQUaZyCxY8lbufYOJXQ4TZM0/SEgi6kKYDis3 6Ug5MX20qCVUkujOTarvleS8JfmCpVv3OhpM/6qNFYuxYFVRQgvo1bdGXEFrbRhrvD/r DB+UZKDbHpDC4uOVAzw7StC4foNk3chPVDL84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=uvGLZLPIz5mf//X2Ypy96qzKxENpgVQjtqAtKzyn+WRJeG/ujmNvcu9Ee2kJvpiXyV NkdJ4wufACVWVLvIeZemOUTYOxs360SZ2oyi75gistzhicFhI5lYKbebikp6hsA4vCZb +IcVsJu/phzV9p6/8TGiE6loLusfJT2VtRSE4= Received: by 10.224.60.136 with SMTP id p8mr3179795qah.330.1283202086363; Mon, 30 Aug 2010 14:01:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.183.135 with HTTP; Mon, 30 Aug 2010 14:01:06 -0700 (PDT) In-Reply-To: References: <1283174836-6330-1-git-send-email-stefanha@linux.vnet.ibm.com> <1283174836-6330-2-git-send-email-stefanha@linux.vnet.ibm.com> From: Blue Swirl Date: Mon, 30 Aug 2010 21:01:06 +0000 Message-ID: To: malc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Anthony Liguori , Prerna Saxena , Stefan Hajnoczi , qemu-devel@nongnu.org Subject: [Qemu-devel] Re: [PATCH 01/14] trace: Add trace-events file for declaring trace events X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Mon, Aug 30, 2010 at 8:42 PM, Blue Swirl wrote: > On Mon, Aug 30, 2010 at 8:10 PM, malc wrote: >> On Mon, 30 Aug 2010, Blue Swirl wrote: >> >>> On Mon, Aug 30, 2010 at 1:27 PM, Stefan Hajnoczi >>> wrote: >>> > This patch introduces the trace-events file where trace events can be >>> > declared like so: >>> > >>> > qemu_malloc(size_t size) "size %zu" >>> > qemu_free(void *ptr) "ptr %p" >>> > >>> > These trace event declarations are processed by a new tool called >>> > tracetool to generate code for the trace events.  Trace event >>> > declarations are independent of the backend tracing system (LTTng User >>> > Space Tracing, ftrace markers, DTrace). >>> >>> I think the tool does not work if 'sh' is not 'bash'. For example, on >>> OpenBSD I got: >> >> Well, it does work with ash. >> >>> >>> config-host.mak is out-of-date, running configure >>> >>> Error: invalid trace backend >>> Please choose a supported trace backend. >>> >>>   GEN   trace.h >>> /src/qemu/tracetool[176]: no closing quote >>> >>> This shows the problem: >>> sh -x ../tracetool --nop --check-backend >>> + set -f >>> ../tracetool[176]: no closing quote >> >> `set -f' is a valid construct according to: >> http://www.opengroup.org/onlinepubs/009695399/utilities/set.html >> >> The problem is likely elsewhere. > > Right, the offending lines are: >    echo ${1%%(*} > and >    args=${1#*(} > > If I remove both of those, the errors are gone. > This patch fixes the problem. Double quotes do not help. diff --git a/tracetool b/tracetool index d640100..01de580 100755 --- a/tracetool +++ b/tracetool @@ -29,14 +29,14 @@ EOF # Get the name of a trace event get_name() { - echo ${1%%(*} + echo ${1%%\(*} } # Get the argument list of a trace event, including types and names get_args() { local args - args=${1#*(} + args=${1#*\(} args=${args%)*} echo "$args" }