Received: by 10.223.185.116 with SMTP id b49csp7032858wrg; Wed, 28 Feb 2018 21:31:01 -0800 (PST) X-Google-Smtp-Source: AG47ELsvdgsB2nAQYilXleW2gZAhnnTfGWK8LIblCvBN6HTrjK8PJYAbt9xSHLw2jwa6ogjEPPcT X-Received: by 2002:a17:902:8b82:: with SMTP id ay2-v6mr758003plb.12.1519882261619; Wed, 28 Feb 2018 21:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519882261; cv=none; d=google.com; s=arc-20160816; b=e50goI8aXYU7aA4j9RH2pnMityjTTUBbrYQz1L5cIbI/1H42k7D7C4LS+jLmRsN+Zw 9yRf9AEGLriHWwmw6xTg66vQNa7F0BD7La21c3DPlQImBfvL2vKoqyJ2tYDV3ZQ9WCTo mNhmPj9n0fGVsSW00JuxlbfRJ8745hyWD57QToxpJX6Ru75HOklmTHhpQCGjmFgtfVmU WwnHCnbTH67WpUHPCF0DJA+5Xsw4XlepxHFrxgjKSpkCyngZ0Hq2ybSgwAf7XQiCxlta MZs3i0SCbpqmxf28aw8hDJ9Qzl6icbwRVVNrIDBRZasi/DsG8Wj1HVT0i7YU8YA0UYkn QjlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=T/kxwx5TM1lJhGg06aCVay87lVFmy6dCyc4Z3lYyxI8=; b=kLqbvZM09Y5hSEnLDS+pwzSssIrOvRfI9cwoJjlaih3wEK8z+fYyHFHBJXgbdlkTot x2vtPcIzZNXVgjGgIjcqZfw3AU5IupvDtK9fqI0Lv4v2hc0MUH+ptnBxJBwvnItoTpgg pmo0HJ0w7pXbMBneThWbCKCuotxXe+fUHHP9S2tsb1Ii/ZnJ7us2R2rN5JgetedcA3aC 2ylaUgvOsTjTb3PBU7SQphLiptv9fSlRLSnZBLdokW165CP1tl7pK7FuOxh7Fkve7ap7 hRtaaDg+9IB95v9O8ViIx0p7RsmkFbJ+Y25Ju0m5hP2beyhSe+akWvQ2GY9+1krT3+8a t5RQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k69si1987932pgd.354.2018.02.28.21.30.46; Wed, 28 Feb 2018 21:31:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966037AbeCAFaG (ORCPT + 99 others); Thu, 1 Mar 2018 00:30:06 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52418 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965996AbeCAFaF (ORCPT ); Thu, 1 Mar 2018 00:30:05 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w215TLSg101686 for ; Thu, 1 Mar 2018 00:30:04 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ge8utmy6x-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 01 Mar 2018 00:30:04 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Mar 2018 05:30:02 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 1 Mar 2018 05:29:58 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w215TwmB131400; Thu, 1 Mar 2018 05:29:58 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1C534C04E; Thu, 1 Mar 2018 05:23:26 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 695524C040; Thu, 1 Mar 2018 05:23:24 +0000 (GMT) Received: from [9.124.31.169] (unknown [9.124.31.169]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Mar 2018 05:23:24 +0000 (GMT) Subject: Re: [RFC 0/4] trace_uprobe: Support SDT markers having semaphore To: Masami Hiramatsu Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, ananth@linux.vnet.ibm.com, naveen.n.rao@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com, oleg@redhat.com, Ravi Bangoria References: <20180228075345.674-1-ravi.bangoria@linux.vnet.ibm.com> <20180228232551.5e99736b4b4fd209e492cd4d@kernel.org> From: Ravi Bangoria Date: Thu, 1 Mar 2018 11:02:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180228232551.5e99736b4b4fd209e492cd4d@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18030105-0020-0000-0000-000003FD279C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030105-0021-0000-0000-000042915426 Message-Id: <0fdb07bd-fe66-5087-9740-1f87f14e4b60@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-01_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803010070 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/28/2018 07:55 PM, Masami Hiramatsu wrote: > Hi Ravi, > > Thank you for your great work! Thanks Masami. > On Wed, 28 Feb 2018 13:23:41 +0530 > Ravi Bangoria wrote: > >> Userspace Statically Defined Tracepoints[1] are dtrace style markers >> inside userspace applications. These markers are added by developer at >> important places in the code. Each marker source expands to a single >> nop instruction in the compiled code but there may be additional >> overhead for computing the marker arguments which expands to couple of >> instructions. If this computaion is quite more, execution of it can be >> ommited by runtime if() condition when no one is tracing on the marker: ... >> >> Semaphore offset is 0x10036. I don't have educated 'perf probe' >> about semaphore. So instead of using 'perf probe' command, I'm >> manually adding entry in the /uprobe_events file. > Ok, it is easy to pass semaphore address via perf probe :) Yes, it should be fairly easy to parse semaphore at buildid-cache time. Will add a patch for that. > >> Special char * denotes semaphore offset. >> >> >> # echo "p:sdt_tick/loop2 /tmp/tick:0x6e4 *0x10036" > uprobe_events > IMHO, this syntax is no good, separate with space is only for arguments. > Since the semaphore is per-probe-point based, that should be specified with probe point. > (there are no 2 or more semaphores on 1 event, are there?) > So something like > > # echo "p:sdt_tick/loop2 /tmp/tick:0x6e4(0x10036)" > uprobe_events This is great suggestion. Will change it. Please review patch 3 and 4 which contains actual implementation. Thanks for the review, Ravi