From patchwork Tue Mar 12 12:35:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 1055374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-497759-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="qlci5yAH"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44JZFX6sCYz9s5c for ; Tue, 12 Mar 2019 23:35:43 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=qeUpshMrGAoyKWdSNidfP1CxdtaL4Uqt3hbiU0jcXjqQuzz0Sp XCyV1rbZTADeJbN1M+pmvEP0U+WHxI/5RZX8g/MZYMKBqfkP+FfM/b1DW5U8QcTX s7fI+SOoNIqEaRMAUHQ//4Au2O2+L25sbf0djQdOyB/2AFWTNl0dv5xdA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=JY35ur4IbXtfCIKGPRpxi7GFM84=; b=qlci5yAHYHtuJdR0tDl4 0Hj3s5m1eXQDdNb57p7JTZnr6IaqKFzgo1+iBnaAHgaol+pQsSxXkBoUrMCRP7FI Ulp8Vf5Zy8pCBgSiua4xIvH4V9qkSCBX9ZvptENLU4R2L1sCA0WHXZbmL67WOwUl sG4L6V/zCZrj16MUlSmi48I= Received: (qmail 76514 invoked by alias); 12 Mar 2019 12:35:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 76500 invoked by uid 89); 12 Mar 2019 12:35:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=moments, Former, UD:cgraph.c, 88235 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Mar 2019 12:35:34 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 006BDAD9F for ; Tue, 12 Mar 2019 12:35:31 +0000 (UTC) From: Martin Jambor To: GCC Patches Cc: Jan Hubicka Subject: [PATCH] Fix dumping of "former thunk" info in cgraph dump User-Agent: Notmuch/0.28.2 (https://notmuchmail.org) Emacs/26.1 (x86_64-suse-linux-gnu) Date: Tue, 12 Mar 2019 13:35:30 +0100 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi, I have forgot to add a newline in cgraph_node dumping that I added last week (the patch to partially address PR 88235). When discussing this, we agreed with Honza that if we dump that a node is a former thunk, we should also dump the various info in the thunk sub-structure that fomrer_thunk_p() looks at. Therefore I consider the following patch pre-approved and will commit it in a few moments (it has passed bootstrap and testing on an x86_64-linux machine). Thanks, Martin 2019-03-11 Martin Jambor * cgraph.c (cgraph_node::dump): Dump more info for former thunks, terminate with newline. --- gcc/cgraph.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 9f0d603a1cf..49d80ad1e28 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2110,7 +2110,12 @@ cgraph_node::dump (FILE *f) (int)thunk.virtual_offset_p); } else if (former_thunk_p ()) - fprintf (f, " Former thunk"); + fprintf (f, " Former thunk fixed offset %i virtual value %i " + "indirect_offset %i has virtual offset %i\n", + (int)thunk.fixed_offset, + (int)thunk.virtual_value, + (int)thunk.indirect_offset, + (int)thunk.virtual_offset_p); if (alias && thunk.alias && DECL_P (thunk.alias)) {