Received: by 10.192.165.148 with SMTP id m20csp656843imm; Wed, 9 May 2018 20:57:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpI+qlymgh7LfaqNILrW+fBKzE3cgDpC+KXFCPKbu+/U1ytdNGa05it9se/26T8bSQYNSZN X-Received: by 10.98.72.29 with SMTP id v29mr40441722pfa.57.1525924657005; Wed, 09 May 2018 20:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525924656; cv=none; d=google.com; s=arc-20160816; b=ABVG3Mzfad8mLzSei/52Xj/Qo7HJ1iqiRb4QTVXyZm1SezFgb1kjy4pgNIqgqEKgh2 87CHt7V+wJFWTOfiS8WCABtdViPyTXe+875YFc5l5vz5K1utJN9nLJ9yj40Hp7sGr1py LeFukItDbAt0ySoCKFj0dmk1MYAEeJJM5N3ikqaAEHeNhVKaYhFoxTQk//K6q0qt4LN2 Ph5CNV/0yYpv98/EYSzjo1AEKvJr9IHi/leICCsh5yKjtTFN2kBcg5VhYRdJWpweZEUZ SbU1DSS3wivZ/L5PVjzNZdrZMxQX/TOvTvPHUQuFJrnJhzS+4D+o0SNo84E6jVZmkXek jQxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=vFbUkql/6MlQ2bXwXsEtfzGj94e+S7Bg3Z8AgbzbyWM=; b=eiY10B+YaW+AswC00WzzOAOB1QHYh12LcwW/sO1Gd033N+MqPj6VNKHfeRKqNJQhMY vRG318g4aZR+5LcowgZwtT5ophOoUxgiclhyuKEy37kmTbjPg+shrTIvPx9V75BYVlBA e3huJZyLYVlHCKB4CZ94zfRb+ACivUXIliXryvLEBz5rbXyy55qhZd40Syn9/OAGaF01 In27UTKBgppqzkbaXW66FEObMm8pSakor4qpr77B7MwmQMRvogOVJHA5V0BbNYHXmphQ Vx99MGdIc/r3vUrOkE5jqE9ekC6Y/kT8Yth9f3UN5f7shJPscRdFzk8a7sWCqlaxxjNh QryQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SD9utg3M; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3-v6si26440791plp.550.2018.05.09.20.57.22; Wed, 09 May 2018 20:57:36 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=SD9utg3M; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934018AbeEJD41 (ORCPT + 99 others); Wed, 9 May 2018 23:56:27 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:46250 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933858AbeEJD40 (ORCPT ); Wed, 9 May 2018 23:56:26 -0400 Received: by mail-pf0-f175.google.com with SMTP id p12-v6so394989pff.13 for ; Wed, 09 May 2018 20:56:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vFbUkql/6MlQ2bXwXsEtfzGj94e+S7Bg3Z8AgbzbyWM=; b=SD9utg3MXAvFQRZi9cwlzwrp3JE28qHfSLhyULNL0o5T05ojesZ/JwV+wlPyPVEMjM sviZY5B3HgsiSuVTmHuzYPHtv5bPmQXw6EtcmUQWpanLaRJsAbbVd37GotFsqb6RU+PR xF26k5oqDWhewjjZeCfsNCt3ke8sXyPEAhM48= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vFbUkql/6MlQ2bXwXsEtfzGj94e+S7Bg3Z8AgbzbyWM=; b=idySewlUNPwWFM1qtcT/wG9PfnTzQ9LMvUOODfT1+fiLTieQbeylqOApBWL5EXuntA u7UVkbDACLfkZTcjifZH4ruiJP5T4O8vTx2l5xcGZNNdKXjk8G77mPUSaK0IfssWcLdy +UJ37iqukHXgRC5buJZzzaWvh4QRBG7BuSbMiA4grh/dUMEU+sCgoAniPr6wWMaTKzTs u51GB+iuFjBaTZoqMTEMvh8Ah0x7OZR9EROlghePflT4SjKViHO9V0tFoGIQTyI6Y0kg buM4JF01tBLEQre0u5wXgv+o8+zsAdgFbjTpLEsnRhwiWHOu0ZXloSJlxQkrkPhEkvxw ro2Q== X-Gm-Message-State: ALKqPwfWr7vptanPvhAv7WKfc1z8STqXTT1bMUSad+a8+5dCoXQooLTz M8m7IlaCo3SYP0J+eA8WzM8fmw== X-Received: by 2002:a63:5f0d:: with SMTP id t13-v6mr99019pgb.132.1525924585590; Wed, 09 May 2018 20:56:25 -0700 (PDT) Received: from leoy-ThinkPad-X240s (li1168-94.members.linode.com. [45.79.69.94]) by smtp.gmail.com with ESMTPSA id 131sm28834723pfa.128.2018.05.09.20.56.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 May 2018 20:56:24 -0700 (PDT) Date: Thu, 10 May 2018 11:56:18 +0800 From: Leo Yan To: Mathieu Poirier Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org Subject: Re: [PATCH v2 1/2] perf cs-etm: Support unknown_thread in cs_etm_auxtrace Message-ID: <20180510035618.GD12205@leoy-ThinkPad-X240s> References: <1525839312-20544-1-git-send-email-leo.yan@linaro.org> <20180509155150.GC25559@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180509155150.GC25559@xps15> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 09, 2018 at 09:51:50AM -0600, Mathieu Poirier wrote: > On Wed, May 09, 2018 at 12:15:11PM +0800, Leo Yan wrote: > > CoreSight doesn't allocate thread structure for unknown_thread in etm > > auxtrace, so unknown_thread is NULL pointer. If the perf data doesn't > > contain valid tid and then cs_etm__mem_access() uses unknown_thread > > instead as thread handler, this results in segmentation fault when > > thread__find_addr_map() accesses thread handler. > > > > This commit creates new thread data which is used by unknown_thread, so > > CoreSight tracing can roll back to use unknown_thread if perf data > > doesn't include valid thread info. This commit also releases thread > > data for initialization failure case and for normal auxtrace free flow. > > Hi Leo, > > Arnaldo maintains the perf tools and he receives dozens of patches every day. > If his name is not the first one to appear on the "To:" list, it is unlikely > that his email filters will catch your patches. Thanks for reminding, Mathieu. Will resend patches for this. Thanks, Leo Yan