From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95712 invoked by alias); 4 Jun 2019 12:35:40 -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 95667 invoked by uid 89); 4 Jun 2019 12:35:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=recorded X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Jun 2019 12:35:38 +0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2019 05:35:37 -0700 Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga004.fm.intel.com with ESMTP; 04 Jun 2019 05:35:36 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.93]) by IRSMSX106.ger.corp.intel.com ([169.254.8.166]) with mapi id 14.03.0415.000; Tue, 4 Jun 2019 13:35:35 +0100 From: "Metzger, Markus T" To: "Willgerodt, Felix" , "gdb-patches@sourceware.org" Subject: RE: [PATCH 03/10] btrace: Enable auxiliary instructions in record function-call-history. Date: Tue, 04 Jun 2019 12:35:00 -0000 Message-ID: References: <1559119673-30516-1-git-send-email-felix.willgerodt@intel.com> <1559119673-30516-4-git-send-email-felix.willgerodt@intel.com> In-Reply-To: <1559119673-30516-4-git-send-email-felix.willgerodt@intel.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00053.txt.bz2 Hello Felix, > Print the auxiliary data when a btrace_insn of type BTRACE_INSN_AUX > is encountered in the function-call-history. Printing is > active by default, it can be silenced with the /s modifier. The /s modifier is used in 'record instruction-history' to mean 'interleave= sources'. I guess we'd want this behavior there, as well. And we'd also want the same modifi= er for both commands. > +static void > +btrace_print_aux_insn (struct ui_out *uiout, > + const struct btrace_function *bfun, > + const struct btrace_thread_info *btinfo) > +{ > + for (const auto &i : bfun->insn) > + { > + if (i.iclass =3D=3D BTRACE_INSN_AUX) > + { > + uiout->text ("\t\t["); We print the number and a single tab for gaps. I'd do the same here. > + uiout->field_fmt ("aux-insn", "%s", Should this be spelled "aux-data" to align with the naming of the field? > + btinfo->aux_data[i.aux_data_index].c_str ()); > + uiout->text ("]\n"); > + } > + } > +} > + > /* Disassemble a section of the recorded function trace. */ >=20 > static void > @@ -1214,6 +1231,10 @@ btrace_call_history (struct ui_out *uiout, > } >=20 > uiout->text ("\n"); > + > + if (((flags & RECORD_DONT_PRINT_AUX) =3D=3D 0) > + && ((bfun->flags & BFUN_AUX_DECODED) !=3D 0)) > + btrace_print_aux_insn(uiout, bfun, btinfo); This ignores the 'record function-call-history-size' setting. > } > } Thanks, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928