From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44989 invoked by alias); 31 Mar 2016 10:58:46 -0000 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 Received: (qmail 44979 invoked by uid 89); 31 Mar 2016 10:58:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=agent X-HELO: mail-pf0-f176.google.com Received: from mail-pf0-f176.google.com (HELO mail-pf0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 31 Mar 2016 10:58:35 +0000 Received: by mail-pf0-f176.google.com with SMTP id 4so67080754pfd.0 for ; Thu, 31 Mar 2016 03:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=a7tthbflRi/xJWDGGKpJ4U5wWqrJ/Tjm63bqD7N4nWY=; b=H2ZLNnYxonRlfU2K/AwEIqBObcG6Bn7XfRC9euNwlvjuzwylEkeR76x1qUD3SvBWoj g+osuCOsYkLPyiTFg6JmPjZecvfJzmlApw82Zr0Kv4rEaZrO11Hi9FDsBM/o7KMBCXTe 7uQqNhZO9C3g7elRCgY9WggSvW/G1I32v3ZCjWG//DfPkBJ6/zLRBbnYFTDmUzJ0het8 7kA1J1XOYttfr939lMarS1/IS9lB4buqMxOOA4xhI9flWJrJt445Dp4nW1KEbg8Dd4Pa 3S9yMm5TVPii1oUsTABM1M37ZX71QB4PtnmGLic7Nj0Ff4i8lmhasEHjsQ5gOQ3brVPc w3Zg== X-Gm-Message-State: AD7BkJIqTYdahOyARXzx3eZEzvCcim3UhelAgHCYmRNSZhYU1bzqJbEOtMW/9Iuo1tJcYw== X-Received: by 10.98.1.197 with SMTP id 188mr21127654pfb.8.1459421913482; Thu, 31 Mar 2016 03:58:33 -0700 (PDT) Received: from E107787-LIN (power-aix.osuosl.org. [140.211.15.154]) by smtp.gmail.com with ESMTPSA id d19sm12608408pfj.92.2016.03.31.03.58.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 31 Mar 2016 03:58:32 -0700 (PDT) From: Yao Qi To: Simon Marchi Cc: Subject: Re: [PATCH 2/2] Add test for fast tracepoint enable/disable References: <1459351018-23718-1-git-send-email-simon.marchi@ericsson.com> <1459351018-23718-2-git-send-email-simon.marchi@ericsson.com> Date: Thu, 31 Mar 2016 10:58:00 -0000 In-Reply-To: <1459351018-23718-2-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Wed, 30 Mar 2016 11:16:58 -0400") Message-ID: <86k2kirk18.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00589.txt.bz2 Simon Marchi writes: > +# Check that the target supports trace. > +if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executabl= e $options] !=3D "" } { > + untested "Couldn't compile test program" > + return -1 > +} Why do you compile program with pthread? > + > +clean_restart ${testfile} > + > +if ![runto_main] { > + fail "Can't run to main to check for trace support" > + return -1 > +} > + > +if ![gdb_target_supports_trace] { > + unsupported "target does not support trace" > + return -1 > +} > + > +# Compile the test case with the in-process agent library. > +set libipa [get_in_proc_agent] > +gdb_load_shlibs $libipa > + > +lappend options shlib=3D$libipa > + > +if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executabl= e $options] !=3D "" } { > + untested "Couldn't compile test program with in-process agent librar= y" > + return -1 > +} Likewise. > + > +# This test makes sure that disabling and enabling fast tracepoints works > +# correctly. > + > +proc test_ftrace_enable_disable { } { Can you extend the test to cover normal tracepoint as well? It shouldn't be hard. You can just pass argument "type" to "proc test_trace_enable_disable" like, proc test_trace_enable_disable { type } { and the type can be "trace" and "ftrace". --=20 Yao (=E9=BD=90=E5=B0=A7)