From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756885AbcBWDXQ (ORCPT ); Mon, 22 Feb 2016 22:23:16 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.226]:27472 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754795AbcBWDXP (ORCPT ); Mon, 22 Feb 2016 22:23:15 -0500 Date: Mon, 22 Feb 2016 22:23:08 -0500 From: Steven Rostedt To: Rasmus Villemoes Cc: Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tracing: don't macro-expand arguments before stringification in TP_printk Message-ID: <20160222222308.12bdfeb3@grimm.local.home> In-Reply-To: <87io3z6xur.fsf@rasmusvillemoes.dk> References: <1450223978-25799-1-git-send-email-linux@rasmusvillemoes.dk> <87io3z6xur.fsf@rasmusvillemoes.dk> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.142:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Dec 2015 01:28:12 +0100 Rasmus Villemoes wrote: > Bah, just found 0462b5664b (ftrace: Output REC->var instead of > __entry->var for trace format). There's some magic here I don't > understand, but I'm wondering if '__entry' wouldn't do just as well as > 'REC' for the tools that try to parse these strings. > > Sorry for the late reply, but I just found this in my INBOX :-) Several tools already exist that use REC to parse. It would be ABI breakage to suddenly convert it to __entry. Not to mention, even in your example of: ((unsigned int) ((REC->dev) >> 20)), ((unsigned int) ((REC->dev) & ((1U << 20) - 1))) which came from MAJOR(__entry->dev), MINOR(__entry->dev), The parsing tools don't know how to parse MAJOR or MINOR but they do know how to do the above macro expansions. Just an FYI, -- Steve