From patchwork Mon May 21 08:52:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 136433 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp51719lji; Mon, 21 May 2018 01:53:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqq202IEQUVMxlXt5wbK8+HeUmvHQokFpIenw55Z6EWo3MIhBvmcvf7S9HKRJfbvhrDn/FG X-Received: by 2002:a65:6101:: with SMTP id z1-v6mr7835775pgu.23.1526892829264; Mon, 21 May 2018 01:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526892829; cv=none; d=google.com; s=arc-20160816; b=Mb2EGQlUx9LIzp5cmW2A+691BsypC/wHMYnClvpuMZ61MI8mRU638mhQhrdqK3EdJy n14E/kF2wPjX7d4mxEXq5F+HIIB9Ex84hEH0FQSn1XAoPPOMmKv1dtSsbW/TvNQLS/JC 8D4+4jjoDDKGHvAZQvKvPv1w/zcgWnq0PCavnE2RjeiWHqZNSX7tLlnKBRP0AS8Ncv6+ 3eY81ol3tBuaRskLDRIH2cDb6onnI/LoOAekc2KsNvLH5+ZpTZdimdu2HcfkpcyDMOw/ GxpvlWYCqgH1wAZEWb3iFzATFdnSZ1QdzC0BJxHD5NJK8PbMEZhzHawp+zio/geknGMa WGEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Bk0a/sYUU4Xt/JywC2m6whoF24x/XfBKep4NsctKs90=; b=HTyShdc5f6BdV2H/p4+lzpgPfI60D5/O18GDDIppPQZzpcZk4hLhGaeK9V+JLM4/YQ r4WCCKO5f4IPAvew1yXpkoOmWv2sI4rSa9jNVX7WHTGUWvv6CLKCO+WENFHbA2QCrKOo GDyvfx7ToYOnbjf8J6bYkBt1o8I7ufrQSQ19kLBZK6yTpdZTKmG56t4ZcJb4eAr/Odxf VSxnWZ4DmRtr7YpvEZYvTKZFaVfk2nULwr8JSHMQ1DhtRuoXpWtHKIzynwnWEIajSckb nksm68V7iCeM252HqQCCB2vG2SadslaS5rGjXIF8qewt+TzyhZ6EVLheEKzNchlAq3ql oXlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UAJCw6T6; 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 m2-v6si9247179pgc.588.2018.05.21.01.53.48; Mon, 21 May 2018 01:53:49 -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=UAJCw6T6; 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 S1751872AbeEUIxr (ORCPT + 29 others); Mon, 21 May 2018 04:53:47 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:41984 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751656AbeEUIxm (ORCPT ); Mon, 21 May 2018 04:53:42 -0400 Received: by mail-pl0-f65.google.com with SMTP id u6-v6so8412976pls.9 for ; Mon, 21 May 2018 01:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bk0a/sYUU4Xt/JywC2m6whoF24x/XfBKep4NsctKs90=; b=UAJCw6T6rKfV2TJchHFp85vATrYc/5ZBgUZ7B7inN/s7RbXRc6RUYVG9iz5GR7iFp8 DTb+BXsL0jOgMa7uBO/xrSp1lZI9g5PXA5g2Fy8YtF/n08s2nlq9T3/d6gT/i3RPkkim GN7BKLTBtN2Vitv4JaaaJJiuQ0QqIk9ZVQvH0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Bk0a/sYUU4Xt/JywC2m6whoF24x/XfBKep4NsctKs90=; b=FvCqncj1hXVWHGpf9tYzYYT/ayqxvCRKC7Chtb+4uSMx4M2t2Qnmtiqgiq/XYqM0nd QYPOQvoRpaoUhortzLNlWIHtlJzk44GXjf94k1LXuvRSvzbS8aBSqOkTCU8mLfjHBJed D+C1HbFWQXDTYQNY/kszH2Wlxbk+im+CqUFc3G3f6NehDURbleNK0/Ft8N9Q3a+9VZu2 s35VKQqW2szQ4nVyHJrC4E6qZzOrlBkDBQVvEMKPi+WlGc/4wDoYFhuIhY34iisnA8gh Qw9fgmf4pp04UXw6pPvvRoDKd7EelExNluTiY++JUrFV/jR9m+P2/5pE2XdFWdllybnn Jk1g== X-Gm-Message-State: ALKqPwdvjvaSEsb+wnCgifASS9Npar9x76ZCyACv+7WawWarzESFbBiu L0R5e7e3aTDDy0IdOTItWq11qw== X-Received: by 2002:a17:902:5382:: with SMTP id c2-v6mr19629122pli.335.1526892822128; Mon, 21 May 2018 01:53:42 -0700 (PDT) Received: from localhost.localdomain (li1209-69.members.linode.com. [45.79.110.69]) by smtp.gmail.com with ESMTPSA id 16-v6sm28553918pfq.115.2018.05.21.01.53.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 May 2018 01:53:40 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Tor Jeremiassen , mike.leach@linaro.org, kim.phillips@arm.com, Robert Walker , coresight@lists.linaro.org Cc: Leo Yan , Mike Leach , Robert Walker Subject: [RFT v2 1/4] perf cs-etm: Generate sample for missed packets Date: Mon, 21 May 2018 16:52:25 +0800 Message-Id: <1526892748-326-2-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526892748-326-1-git-send-email-leo.yan@linaro.org> References: <1526892748-326-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit e573e978fb12 ("perf cs-etm: Inject capabilitity for CoreSight traces") reworks the samples generation flow from CoreSight trace to match the correct format so Perf report tool can display the samples properly. But the change has side effect for packet handling, it only generate samples when 'prev_packet->last_instr_taken_branch' is true, this results in the start tracing packet and exception packets are dropped. This patch checks extra two conditions for complete samples: - If 'prev_packet->sample_type' is zero we can use this condition to get to know this is the start tracing packet; for this case, the start packet's end_addr is zero as well so we need to handle it in the function cs_etm__last_executed_instr(); - If 'prev_packet->exc' is true, we can know the previous packet is exception handling packet so need to generate sample for exception flow. Fixes: e573e978fb12 ("perf cs-etm: Inject capabilitity for CoreSight traces") Cc: Mike Leach Cc: Robert Walker Cc: Mathieu Poirier Signed-off-by: Leo Yan --- tools/perf/util/cs-etm.c | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) -- 2.7.4 Reviewed-by: Robert Walker diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 822ba91..378953b 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -495,6 +495,13 @@ static inline void cs_etm__reset_last_branch_rb(struct cs_etm_queue *etmq) static inline u64 cs_etm__last_executed_instr(struct cs_etm_packet *packet) { /* + * The packet is the start tracing packet if the end_addr is zero, + * returns 0 for this case. + */ + if (!packet->end_addr) + return 0; + + /* * The packet records the execution range with an exclusive end address * * A64 instructions are constant size, so the last executed @@ -897,13 +904,27 @@ static int cs_etm__sample(struct cs_etm_queue *etmq) etmq->period_instructions = instrs_over; } - if (etm->sample_branches && - etmq->prev_packet && - etmq->prev_packet->sample_type == CS_ETM_RANGE && - etmq->prev_packet->last_instr_taken_branch) { - ret = cs_etm__synth_branch_sample(etmq); - if (ret) - return ret; + if (etm->sample_branches && etmq->prev_packet) { + bool generate_sample = false; + + /* Generate sample for start tracing packet */ + if (etmq->prev_packet->sample_type == 0) + generate_sample = true; + + /* Generate sample for exception packet */ + if (etmq->prev_packet->exc == true) + generate_sample = true; + + /* Generate sample for normal branch packet */ + if (etmq->prev_packet->sample_type == CS_ETM_RANGE && + etmq->prev_packet->last_instr_taken_branch) + generate_sample = true; + + if (generate_sample) { + ret = cs_etm__synth_branch_sample(etmq); + if (ret) + return ret; + } } if (etm->sample_branches || etm->synth_opts.last_branch) { From patchwork Mon May 21 08:52:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 136434 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp51829lji; Mon, 21 May 2018 01:53:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqPNt5O+n73kPD4tgfQK/87yMKYqTmM3Hrf55hAYI+UocIag4E+5q8KrEPf6H5+mHqLGKbT X-Received: by 2002:a17:902:6ac6:: with SMTP id i6-v6mr20004698plt.31.1526892838560; Mon, 21 May 2018 01:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526892838; cv=none; d=google.com; s=arc-20160816; b=nvDkhNLSYBzS4HgO6KeNDCqEfhu0JwxUI1/XYYFq8VkMh23+K0rk26grXuIiAmJBnW wKZFdIyMfy4EmWW1SoBnSH7euv56mtz1p+dHzzEC52hFl6TnnEGjpgx4O8uievpzP6KX YWuH4gw8DPZeIeQ+KpZAejMb+66W92ZIf55TZODmTPrYLeZhULFzZ5Cw1SjR532OiFSr xoqCENT+pejdoyxlmnWRq0YHOdt9n+NnqqcgwtsWveXzwle/hytZKoyhv69p8KWKG3vf sBtY5/V2YVshvVROtAe26WrENNvw8OTYeBdNwDJt/+a37AnoQNVvH9/7xZClBwK4r7CV C+KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=g2s0qKAeszFhKKHrQ+56mjV/yVHzAXmicKjIaEfOtZk=; b=GYOv+POXcJAdBeuI1yPR8dRqsb27jNUSjlpk9j426tn1B5MhCAgmIjeLUkWgLp5bht ZezeN/6xhb479BInCorv3/CeVajpnwf0C+6DXU2a5028g+xwu0evaKhRyEmQ+w4PMonI O4Ab02/9/g+3FPeF+6FK1+W8r+/WpWOBHov/DS7e2b1PKn8KV8yma/ADLGf6VO9k/bO7 9Eg7hsmuTEWVmGWkJZp9FYNdwLyOQS3VUVUKMn1R9qnLMRlll9pO+f4WqDA4sSYAZaIG VABr+I0dot1dqFl8mXbNOLdebfHM07sYngPIL2+quvgMgQU19kisEWsnas8Bg7SKLS0q gCtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GE279JS2; 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 73-v6si6838802pge.55.2018.05.21.01.53.58; Mon, 21 May 2018 01:53:58 -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=GE279JS2; 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 S1752231AbeEUIxz (ORCPT + 29 others); Mon, 21 May 2018 04:53:55 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33087 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbeEUIxs (ORCPT ); Mon, 21 May 2018 04:53:48 -0400 Received: by mail-pf0-f195.google.com with SMTP id a20-v6so6769167pfo.0 for ; Mon, 21 May 2018 01:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g2s0qKAeszFhKKHrQ+56mjV/yVHzAXmicKjIaEfOtZk=; b=GE279JS20lqPnyDT/EctkUZE9fTNwX7lTGyFFiii8DuW9FqzqUwbuB36MhTqT8qREB kr0ikmOfxnmdi9bjoTt8ivGLdPJDv8p7S9diaJUWxNJixSLt7APFpFf5Kn0axt0Grff3 1YswPReSsmyAlRfroZ5unoR4PHFmkPYbtmnKs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=g2s0qKAeszFhKKHrQ+56mjV/yVHzAXmicKjIaEfOtZk=; b=M9Kju6f7YzxlUL0uZ3tGnNC3EP/fsDNbaIapDjZtRRzrLOJOCTOoh1k3ZKfetAqj/n /nDXphxiYIV2s2g7YB+PpGqS7ELO5GuCV9hjbV50KG7negOeSe2WL9mo+KE090Vax1fg 52lGerlW22MkG2+xnwOSN9dZSLifAkWAKpmDetKlsc3oy5ad79JGN0NLIoR5f1dH3+8c gLqimS1lnrDjJO9qB6AdXQHjyCjOsK/gk8qyLuO1myo1a7F1nZL8fyxIT/3uGO6ygPMM UJut4HYWF17GO6A2VpwS4xxixKixvnsXxq4+fJBuVPOydqFSngBkm7v7MbfYRJoIpARE IgIw== X-Gm-Message-State: ALKqPwdBYw3fKmHm47oZ8FG+bbtEQAgyeiPgDiIeGQk9Gqay5I7CVazB t8EUw4zAtjtmXZuzeskm7dv+xA== X-Received: by 2002:a62:3ec2:: with SMTP id y63-v6mr19235088pfj.102.1526892827728; Mon, 21 May 2018 01:53:47 -0700 (PDT) Received: from localhost.localdomain (li1209-69.members.linode.com. [45.79.110.69]) by smtp.gmail.com with ESMTPSA id 16-v6sm28553918pfq.115.2018.05.21.01.53.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 May 2018 01:53:46 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Tor Jeremiassen , mike.leach@linaro.org, kim.phillips@arm.com, Robert Walker , coresight@lists.linaro.org Cc: Leo Yan Subject: [RFT v2 2/4] perf script python: Add addr into perf sample dict Date: Mon, 21 May 2018 16:52:26 +0800 Message-Id: <1526892748-326-3-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526892748-326-1-git-send-email-leo.yan@linaro.org> References: <1526892748-326-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ARM CoreSight auxtrace uses 'sample->addr' to record the target address for branch instructions, so the data of 'sample->addr' is required for tracing data analysis. This commit collects data of 'sample->addr' into perf sample dict, finally can be used for python script for parsing event. Signed-off-by: Leo Yan --- tools/perf/util/scripting-engines/trace-event-python.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 10dd5fc..7f8afac 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c @@ -531,6 +531,8 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, PyLong_FromUnsignedLongLong(sample->period)); pydict_set_item_string_decref(dict_sample, "phys_addr", PyLong_FromUnsignedLongLong(sample->phys_addr)); + pydict_set_item_string_decref(dict_sample, "addr", + PyLong_FromUnsignedLongLong(sample->addr)); set_sample_read_in_dict(dict_sample, sample, evsel); pydict_set_item_string_decref(dict, "sample", dict_sample); From patchwork Mon May 21 08:52:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 136435 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp51895lji; Mon, 21 May 2018 01:54:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpC4PYyXAMBIt+eoi1jgMelH/Ecb6FEJiSr772Zjmh2kDrLjg7Tw5u5/60H1eonbFVZSrPD X-Received: by 2002:a62:190f:: with SMTP id 15-v6mr19163585pfz.42.1526892844873; Mon, 21 May 2018 01:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526892844; cv=none; d=google.com; s=arc-20160816; b=0Z26IIiEC0a2dc1BgWYNNOrtTBS/RVprzTc71XMLz6DJL9XCi2XKVHEQag0MmkugZb eQw0PNBQ6/MnR1Ji/J38mqFBALnea4JYjLAIqks8UOYoReJlBBD7mOHfF4ZzLOPFiGGp ogskOiim/pxDJdm+WJe08wUPTI0hFlcAEiNIIQIRB3LC1CpxY9F9CuJxKKDRfSDbQWTF fViEP4f1A62ynGcjoEJcuV3xCE+65fCFxHRlg9vK//Z2i1EAPyopPxiHj5JLOWtjjUun sUzivML/i7MfQWg3T/Gbnp6YIUXc4CDg1A16z+QZ7mEZWhu2ISRAnHn8y+C+80KEElbh eygQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=xdlUc8WeE5UkE88DkEWHHJQ6INcttxV6gx6YnOzjado=; b=TqLWC4/s9NGEjIGzImgfIlcgkHp7ZXUPajEEvvg+Wy16bkqhZibK0PuKVycqEtijGa RkCY13msKnmGMzA7chaIaVN/GI6LBENa/TejdimdmW6Ez03Tg462CYT5s6FkumNggWoR aGc+eU+nou8rRu9nP9WYhiSGXv75/hGmp7JqKBxQe82RkveVsoWvMUlmH5mnDJjVLGUh 0HIGUdZAXWVGmoclqc7+hK3j3i/7qL61uo/di6LHJasSIcpMSLLcs/n1Sd8UfUDz8wga zFG/W/wiP6qCvlsbGFsPBB1RLwcTWGfvKGa5VKarRYQ6L7pVxuedl32C6tANBhoizgP5 3MQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DeUYYuFv; 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 73-v6si6838802pge.55.2018.05.21.01.54.04; Mon, 21 May 2018 01:54:04 -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=DeUYYuFv; 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 S1752535AbeEUIyD (ORCPT + 29 others); Mon, 21 May 2018 04:54:03 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:33047 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbeEUIxy (ORCPT ); Mon, 21 May 2018 04:53:54 -0400 Received: by mail-pl0-f65.google.com with SMTP id n10-v6so8422806plp.0 for ; Mon, 21 May 2018 01:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xdlUc8WeE5UkE88DkEWHHJQ6INcttxV6gx6YnOzjado=; b=DeUYYuFvjZ/gNSeWTCzCrhIJKkMJ3bkGL97LClp3h5ssg28ZQUBprxLS4xAF2NBsZs i4PQp9qhOZw7zmKF9NZHlyEqkCnOCoYbxM2/lkeBvlFvbabhnoE+WXBu54vbRhk9H5Xi JFstEf6JgtQj2AfYJ8ZX2OYfkLy3x0jdSs+ms= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xdlUc8WeE5UkE88DkEWHHJQ6INcttxV6gx6YnOzjado=; b=C8QlVLorCV/I/sQosFYOALIRJmPA3E80U7sVje2abtZQ5C22EOPNQhjuE/HdpI9HWA j8cfGv4JQDkOZaBe54JAPsmR6ZLR+n86ZfkoOccAbt/Ceyq+um6uAMO0ij9K4++AxQxO voSRdNuR/G42jmDHOF7GRJD7c1dBv53X+hzrwJ04XpjdwyoA7ximeivZDFrG6Sc2DQGn G7uWJnLNCaF54/eNlkdcgzcRS0+eT8dpVlOLgsnxDNQQJcmZ+i44WV2WJSg5VKAnW43B xA1svvYW5TDa1XT3Ma2OQx++Foni2VwvfOw9F7whe1jcFCrKsu5tu9QOOo6tgyhI0SV0 FEDw== X-Gm-Message-State: ALKqPwfX4eF1MpAkUHZ6rYORIb09HrfiIHmT8KY67F3QQ8RxWCX18pOP pQEtUFPJKJQpWLVParf06NfqtA== X-Received: by 2002:a17:902:aa83:: with SMTP id d3-v6mr6123545plr.323.1526892833947; Mon, 21 May 2018 01:53:53 -0700 (PDT) Received: from localhost.localdomain (li1209-69.members.linode.com. [45.79.110.69]) by smtp.gmail.com with ESMTPSA id 16-v6sm28553918pfq.115.2018.05.21.01.53.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 May 2018 01:53:52 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Tor Jeremiassen , mike.leach@linaro.org, kim.phillips@arm.com, Robert Walker , coresight@lists.linaro.org Cc: Leo Yan Subject: [RFT v2 3/4] perf script python: Add script for CoreSight trace disassembler Date: Mon, 21 May 2018 16:52:27 +0800 Message-Id: <1526892748-326-4-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526892748-326-1-git-send-email-leo.yan@linaro.org> References: <1526892748-326-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit adds python script to parse CoreSight tracing event and use command 'objdump' for disassembled lines, finally we can generate readable program execution flow for reviewing tracing data. The script receives CoreSight tracing packet with below format: +------------+------------+------------+ packet(n): | addr | ip | cpu | +------------+------------+------------+ packet(n+1): | addr | ip | cpu | +------------+------------+------------+ packet::ip is the last address of current branch instruction and packet::addr presents the start address of the next coming branch instruction. So for one branch instruction which starts in packet(n), its execution flow starts from packet(n)::addr and it stops at packet(n+1)::ip. As results we need to combine the two continuous packets to generate the instruction range, this is the rationale for the script implementation: [ sample(n)::addr .. sample(n+1)::ip ] Credits to Tor Jeremiassen who have written the script skeleton and provides the ideas for reading symbol file according to build-id, creating memory map for dso and basic packet handling. Mathieu Poirier contributed fixes for build-id and memory map bugs. The detailed development history for this script you can find from [1]. Based on Tor and Mathieu work, the script is updated samples handling for the corrected sample format. Another minor enhancement is to support for without build-id case, the script can parse kernel symbols with option '-k' for vmlinux file path. [1] https://github.com/Linaro/perf-opencsd/commits/perf-opencsd-v4.15/tools/perf/scripts/python/cs-trace-disasm.py Co-authored-by: Tor Jeremiassen Co-authored-by: Mathieu Poirier Signed-off-by: Leo Yan --- tools/perf/scripts/python/arm-cs-trace-disasm.py | 234 +++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 tools/perf/scripts/python/arm-cs-trace-disasm.py -- 2.7.4 diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py new file mode 100644 index 0000000..58de36f --- /dev/null +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py @@ -0,0 +1,234 @@ +# arm-cs-trace-disasm.py: ARM CoreSight Trace Dump With Disassember +# SPDX-License-Identifier: GPL-2.0 +# +# Tor Jeremiassen is original author who wrote script +# skeleton, Mathieu Poirier contributed +# fixes for build-id and memory map; Leo Yan +# updated the packet parsing with new samples format. + +import os +import sys +import re +from subprocess import * +from optparse import OptionParser, make_option + +# Command line parsing + +option_list = [ + # formatting options for the bottom entry of the stack + make_option("-k", "--vmlinux", dest="vmlinux_name", + help="Set path to vmlinux file"), + make_option("-d", "--objdump", dest="objdump_name", + help="Set path to objdump executable file"), + make_option("-v", "--verbose", dest="verbose", + action="store_true", default=False, + help="Enable debugging log") +] + +parser = OptionParser(option_list=option_list) +(options, args) = parser.parse_args() + +if (options.objdump_name == None): + sys.exit("No objdump executable file specified - use -d or --objdump option") + +# Initialize global dicts and regular expression + +build_ids = dict() +mmaps = dict() +disasm_cache = dict() +cpu_data = dict() +disasm_re = re.compile("^\s*([0-9a-fA-F]+):") +disasm_func_re = re.compile("^\s*([0-9a-fA-F]+)\s\<.*\>:") +cache_size = 32*1024 +prev_cpu = -1 + +def parse_buildid(): + global build_ids + + buildid_regex = "([a-fA-f0-9]+)[ \t]([^ \n]+)" + buildid_re = re.compile(buildid_regex) + + results = check_output(["perf", "buildid-list"]).split('\n'); + for line in results: + m = buildid_re.search(line) + if (m == None): + continue; + + id_name = m.group(2) + id_num = m.group(1) + + if (id_name == "[kernel.kallsyms]") : + append = "/kallsyms" + elif (id_name == "[vdso]") : + append = "/vdso" + else: + append = "/elf" + + build_ids[id_name] = os.environ['PERF_BUILDID_DIR'] + \ + "/" + id_name + "/" + id_num + append; + # Replace duplicate slash chars to single slash char + build_ids[id_name] = build_ids[id_name].replace('//', '/', 1) + + if ((options.vmlinux_name == None) and ("[kernel.kallsyms]" in build_ids)): + print "kallsyms cannot be used to dump assembler" + + # Set vmlinux path to replace kallsyms file, if without buildid we still + # can use vmlinux to prase kernel symbols + if ((options.vmlinux_name != None)): + build_ids['[kernel.kallsyms]'] = options.vmlinux_name; + +def parse_mmap(): + global mmaps + + # Check mmap for PERF_RECORD_MMAP and PERF_RECORD_MMAP2 + mmap_regex = "PERF_RECORD_MMAP.* -?[0-9]+/[0-9]+: \[(0x[0-9a-fA-F]+)\((0x[0-9a-fA-F]+)\).*:\s.*\s(\S*)" + mmap_re = re.compile(mmap_regex) + + results = check_output("perf script --show-mmap-events | fgrep PERF_RECORD_MMAP", shell=True).split('\n') + for line in results: + m = mmap_re.search(line) + if (m != None): + if (m.group(3) == '[kernel.kallsyms]_text'): + dso = '[kernel.kallsyms]' + else: + dso = m.group(3) + + start = int(m.group(1),0) + end = int(m.group(1),0) + int(m.group(2),0) + mmaps[dso] = [start, end] + +def find_dso_mmap(addr): + global mmaps + + for key, value in mmaps.items(): + if (addr >= value[0] and addr < value[1]): + return key + + return None + +def read_disam(dso, start_addr, stop_addr): + global mmaps + global build_ids + + addr_range = start_addr + ":" + stop_addr; + + # Don't let the cache get too big, clear it when it hits max size + if (len(disasm_cache) > cache_size): + disasm_cache.clear(); + + try: + disasm_output = disasm_cache[addr_range]; + except: + try: + fname = build_ids[dso]; + except KeyError: + sys.exit("cannot find symbol file for " + dso) + + disasm = [ options.objdump_name, "-d", "-z", + "--start-address="+start_addr, + "--stop-address="+stop_addr, fname ] + + disasm_output = check_output(disasm).split('\n') + disasm_cache[addr_range] = disasm_output; + + return disasm_output + +def dump_disam(dso, start_addr, stop_addr, check_svc): + for line in read_disam(dso, start_addr, stop_addr): + m = disasm_func_re.search(line) + if (m != None): + print "\t",line + continue + + m = disasm_re.search(line) + if (m == None): + continue; + + print "\t",line + + if ((check_svc == True) and "svc" in line): + return + +def dump_packet(sample): + print "Packet = { cpu: 0x%d addr: 0x%x phys_addr: 0x%x ip: 0x%x " \ + "pid: %d tid: %d period: %d time: %d }" % \ + (sample['cpu'], sample['addr'], sample['phys_addr'], \ + sample['ip'], sample['pid'], sample['tid'], \ + sample['period'], sample['time']) + +def trace_begin(): + print 'ARM CoreSight Trace Data Assembler Dump' + parse_buildid() + parse_mmap() + +def trace_end(): + print 'End' + +def trace_unhandled(event_name, context, event_fields_dict): + print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())]) + +def process_event(param_dict): + global cache_size + global options + global prev_cpu + + sample = param_dict["sample"] + + if (options.verbose == True): + dump_packet(sample) + + # If period doesn't equal to 1, this packet is for instruction sample + # packet, we need drop this synthetic packet. + if (sample['period'] != 1): + print "Skip synthetic instruction sample" + return + + cpu = format(sample['cpu'], "d"); + + # Initialize CPU data if it's empty, and directly return back + # if this is the first tracing event for this CPU. + if (cpu_data.get(str(cpu) + 'addr') == None): + cpu_data[str(cpu) + 'addr'] = format(sample['addr'], "#x") + prev_cpu = cpu + return + + # The format for packet is: + # + # +------------+------------+------------+ + # sample_prev: | addr | ip | cpu | + # +------------+------------+------------+ + # sample_next: | addr | ip | cpu | + # +------------+------------+------------+ + # + # We need to combine the two continuous packets to get the instruction + # range for sample_prev::cpu: + # + # [ sample_prev::addr .. sample_next::ip ] + # + # For this purose, sample_prev::addr is stored into cpu_data structure + # and read back for 'start_addr' when the new packet comes, and we need + # to use sample_next::ip to calculate 'stop_addr', plusing extra 4 for + # 'stop_addr' is for the sake of objdump so the final assembler dump can + # include last instruction for sample_next::ip. + + start_addr = cpu_data[str(prev_cpu) + 'addr'] + stop_addr = format(sample['ip'] + 4, "#x") + + # Sanity checking dso for start_addr and stop_addr + prev_dso = find_dso_mmap(int(start_addr, 0)) + next_dso = find_dso_mmap(int(stop_addr, 0)) + + # If cannot find dso so cannot dump assembler, bail out + if (prev_dso == None or next_dso == None): + print "Address range [ %s .. %s ]: failed to find dso" % (start_addr, stop_addr) + prev_cpu = cpu + return + elif (prev_dso != next_dso): + print "Address range [ %s .. %s ]: isn't in same dso" % (start_addr, stop_addr) + prev_cpu = cpu + return + + dump_disam(prev_dso, start_addr, stop_addr, False) + + cpu_data[str(cpu) + 'addr'] = format(sample['addr'], "#x") + prev_cpu = cpu From patchwork Mon May 21 08:52:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 136436 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp51938lji; Mon, 21 May 2018 01:54:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq+53Bt4/BgAzUTiYbbSmCiZNjwHF6jixg+w75u1eiBmOZ3Q8cJM905SiJR8z4LImhSqMjF X-Received: by 2002:a62:11dc:: with SMTP id 89-v6mr19273651pfr.18.1526892848888; Mon, 21 May 2018 01:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526892848; cv=none; d=google.com; s=arc-20160816; b=v2mWu6ECVnBaEx5b4izqBDa3VSYGksnzKlh4HTTVimUdV50C9hgMHqzrv5T1OEU7oI +wVKEnfIituvCCBFBaUpcMm8UOdfjQwoFINvMLwonPu2cFj5MFLT+YW1udxqh31eRa2j xkX+vKd59R6ewC6x+ifl/T1ukUh0FzotURZrkpBsoFyZQvvlRqXNc5gKaYSCFoV8lSEj SY1++7hOBvzWVDRBEX1eDhiFXcHJnjXo/V5aIC1GU6KbBZf/+NnPiifTWZF/RlQxEvq0 4Uyu8tMAAhDAuvoLawyqONfx/YJE3QQG+7TnrzDj36hoBmyJYKEqYh3CCfIx+hHv7aHT EBxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=NnN/fhGrSR8SrEds0HmRI/5r4C+zJoMVSRbsuhZ0Y3Y=; b=BvTAUHmr7CTcp9ysGqHpYL0vdz7HSvbm/Upx12KaKL7ZQDOsVxLMCslSotLrxuhnHY glBjrMnaz/fyU2vN1HIREPqH0owJSsGs+FifH+L8ujluWHBvdGxtEXeJrNc2mZZwO/iS dRjLPDxalkzE8vEaj8+kgk0u7J7VNzcBLKJEISBR0yhxKZFkFE88S+wt7CFKvFEXFEz4 8oMsnoQuw5KVKNfDUZF+0wrUL3+sevOPxycmxSf8M33FWwLLft1HSx2aGHUuDzwrMydG AcI3MJdT2jnz55ENBiVXDcOhde+wtRb3QjrB+ZXxZ7CB2/qWbl2ynn47ACnNp4gN5FnV p/EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Myu1ilwl; 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 32-v6si13855641ple.319.2018.05.21.01.54.08; Mon, 21 May 2018 01:54:08 -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=Myu1ilwl; 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 S1752605AbeEUIyE (ORCPT + 29 others); Mon, 21 May 2018 04:54:04 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:41248 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbeEUIyA (ORCPT ); Mon, 21 May 2018 04:54:00 -0400 Received: by mail-pf0-f193.google.com with SMTP id v63-v6so6755813pfk.8 for ; Mon, 21 May 2018 01:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NnN/fhGrSR8SrEds0HmRI/5r4C+zJoMVSRbsuhZ0Y3Y=; b=Myu1ilwl1cX/e+DgnWHGowuOZYQcc6J3QGoDMvIwz8KULGpSPGEGOAOjk1nTuMV3cD QQfkeldDdwlzhz2PclCVUIhdvyp8CWM1WUyTZ/K4pzsiGXQhOC8nT3PIAgmuwc7FPEwR wR/4tdETaXc15BMZOUuWfTLJDWbYghUMbQqIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NnN/fhGrSR8SrEds0HmRI/5r4C+zJoMVSRbsuhZ0Y3Y=; b=J4hb+Rj0Hgit9qqhrZ0ZBUfh1bWK0aSbol48HtEC6yN0uHqbDRGdnNMeuWPAw8gbyg OWkOYPHiuWitL2nRCnwmZJf1uA42nw7KGqQOSkicSkBsziPSp1XCf+XD6RHvHjeOlmXC wR2nUHgeLt23FreBO1FReiCiUVdGiVqxYN4S4IIQ9ayRVlaDB5wAb4X26INpsyIThSI/ 4SRSrHGtwTROA03pw1FWPDSB8WJOkdrbBOU/YZ3URe7AdDxDDNelbvS4lIwMHEcN9yFf r86HBgfWPrYPP8kkEAcOAckm+KqC5hqtzV+CfS1lr2N7nBLxZmIhbTSTNmGuQfjsKLTA Wvfw== X-Gm-Message-State: ALKqPweiRS2GKN4XfL2/yPcBLdlHr+pmxVDq5PYiKPMIhfcXIwXnqfEG VNnSlli3478xeniU4fFWnSTKcQ== X-Received: by 2002:a62:9d89:: with SMTP id a9-v6mr19171509pfk.206.1526892839364; Mon, 21 May 2018 01:53:59 -0700 (PDT) Received: from localhost.localdomain (li1209-69.members.linode.com. [45.79.110.69]) by smtp.gmail.com with ESMTPSA id 16-v6sm28553918pfq.115.2018.05.21.01.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 May 2018 01:53:58 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Tor Jeremiassen , mike.leach@linaro.org, kim.phillips@arm.com, Robert Walker , coresight@lists.linaro.org Cc: Leo Yan Subject: [RFT v2 4/4] coresight: Document for CoreSight trace disassembler Date: Mon, 21 May 2018 16:52:28 +0800 Message-Id: <1526892748-326-5-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526892748-326-1-git-send-email-leo.yan@linaro.org> References: <1526892748-326-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit documents CoreSight trace disassembler usage and gives example for it. Signed-off-by: Leo Yan --- Documentation/trace/coresight.txt | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) -- 2.7.4 diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt index 6f0120c..b8f2359 100644 --- a/Documentation/trace/coresight.txt +++ b/Documentation/trace/coresight.txt @@ -381,3 +381,55 @@ sort example is from the AutoFDO tutorial (https://gcc.gnu.org/wiki/AutoFDO/Tuto $ taskset -c 2 ./sort_autofdo Bubble sorting array of 30000 elements 5806 ms + + +Tracing data disassembler +------------------------- + +'perf script' supports to use script to parse tracing packet and rely on +'objdump' for disassembled lines, this can convert tracing data to readable +program execution flow for easily reviewing tracing data. + +The CoreSight trace disassembler is located in the folder: +tools/perf/scripts/python/arm-cs-trace-disasm.py. This script support below +options: + + -d, --objdump: Set path to objdump executable, this option is + mandatory. + -k, --vmlinux: Set path to vmlinux file. + -v, --verbose: Enable debugging log, after enable this option the + script dumps every event data. + +Below is one example for using python script to dump CoreSight trace +disassembler: + + $ perf script -s arm-cs-trace-disasm.py -i perf.data \ + -F cpu,event,ip,addr,sym -- -d objdump -k ./vmlinux > cs-disasm.log + +Below is one example for the disassembler log: + +ARM CoreSight Trace Data Assembler Dump + ffff000008a5f2dc : + ffff000008a5f2dc: 340000a0 cbz w0, ffff000008a5f2f0 + ffff000008a5f2f0 : + ffff000008a5f2f0: f9400260 ldr x0, [x19] + ffff000008a5f2f4: d5033f9f dsb sy + ffff000008a5f2f8: 913ec000 add x0, x0, #0xfb0 + ffff000008a5f2fc: b900001f str wzr, [x0] + ffff000008a5f300: f9400bf3 ldr x19, [sp, #16] + ffff000008a5f304: a8c27bfd ldp x29, x30, [sp], #32 + ffff000008a5f308: d65f03c0 ret + ffff000008a5fa18 : + ffff000008a5fa18: 14000025 b ffff000008a5faac + ffff000008a5faac : + ffff000008a5faac: b9406261 ldr w1, [x19, #96] + ffff000008a5fab0: 52800015 mov w21, #0x0 // #0 + ffff000008a5fab4: f901ca61 str x1, [x19, #912] + ffff000008a5fab8: 2a1503e0 mov w0, w21 + ffff000008a5fabc: 3940e261 ldrb w1, [x19, #56] + ffff000008a5fac0: f901ce61 str x1, [x19, #920] + ffff000008a5fac4: a94153f3 ldp x19, x20, [sp, #16] + ffff000008a5fac8: a9425bf5 ldp x21, x22, [sp, #32] + ffff000008a5facc: a94363f7 ldp x23, x24, [sp, #48] + ffff000008a5fad0: a8c47bfd ldp x29, x30, [sp], #64 + ffff000008a5fad4: d65f03c0 ret