From patchwork Thu Nov 7 21:03:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 11233773 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3704F14E5 for ; Thu, 7 Nov 2019 21:03:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EF9D21D79 for ; Thu, 7 Nov 2019 21:03:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EF9D21D79 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poorly.run Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 93FF76F7BF; Thu, 7 Nov 2019 21:03:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc43.google.com (mail-yw1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 93EA66F7BB for ; Thu, 7 Nov 2019 21:03:20 +0000 (UTC) Received: by mail-yw1-xc43.google.com with SMTP id y64so1132405ywe.3 for ; Thu, 07 Nov 2019 13:03:20 -0800 (PST) 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:mime-version:content-transfer-encoding; bh=oygH01nqalvIc07wdgdaNh2D6+M1eA2NsoFjJs/rDb0=; b=RRgq4G0gZVkNDX4zfUXtYtoJRes6T0f3+zUYbRt7tIxSFkqPNMcNfCGd2BgHHlmxaQ Df6S14tvEkTt4cBL0UAiKk3WF8lJpY78MHTrP7ab3vD2ptzWw2oOVcBl9WGOuqwFdCHt 0jt1ZwWvvL6mvjJ2jGCPIrC5wm6zD2n+3TYrXC2qNYbh7p1h9yKmJo41ZwZhcQ5Ef6WX wz1qu4ZdAGXMPlHjxLCwsagpLxZhUDCTPM5kUEBemESjmwG6X9kkrE/uFZ1IRxH1f+3T 5Go0/HY4bP6WFxoLz9IzwrizjZQRyiB/zk5mPlB+GR8Efx+MSvuR3xOMkZVaGk/TAwlA 1Pow== X-Gm-Message-State: APjAAAXfLe9+Sne8QM33hokgfq+j8OGwsfCG5njx8tShRYDlw85/IJDJ f6mgZi41OBH4GkyDPqNhTDQ+qO+ZScQ= X-Google-Smtp-Source: APXvYqybyUG3wYkJ3VuqgaYSln7LF9ZLFNUkASeuMvWC6u9J0rW2V9pyns2Zw600jfzNSnsYKf2Odw== X-Received: by 2002:a0d:cc91:: with SMTP id o139mr4228911ywd.373.1573160599586; Thu, 07 Nov 2019 13:03:19 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id r14sm1064196ywl.97.2019.11.07.13.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 13:03:19 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/6] drm: trace: Make the vblank queued/delivered events classed Date: Thu, 7 Nov 2019 16:03:00 -0500 Message-Id: <20191107210316.143216-2-sean@poorly.run> X-Mailer: git-send-email 2.24.0.rc1.363.gb1bccd3e3d-goog In-Reply-To: <20191107210316.143216-1-sean@poorly.run> References: <20191107210316.143216-1-sean@poorly.run> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oygH01nqalvIc07wdgdaNh2D6+M1eA2NsoFjJs/rDb0=; b=KTF28fihFWzJ8ff6rJKJ6Ewe+3QwnTlEM+4+QqV2AVD2G0sa2z+oq4pKP0eMDaOyZe rjq55tk25mxy1+cj7P/8sZazXnIGyGCNscjnNZbOH57Lq8TDBz+078xFG6GgJgCLdR53 dUQdZ62QsUYAcudkbrltrYYVZl+alVFkjiseQEsExitp7nu4/dLrkU0b++IOdx3TL4Cr HOeFAETYYf9baKQegpnuBAMMAfNH/UfkyYTNV8jmfzmanXwGqU3pdW/MMfqxE1aLQx3R PjuuQWpma1NXbKYTrNRGgRKYOAP8/7lxtvK+WHE5A9SgwEbfvbeHhR2WpXry+S3zxQtC AA+A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.vetter@ffwll.ch, Sean Paul , tzimmermann@suse.de Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Sean Paul We can use an event class to remove some boilerplate for the event queued/delivered trace events. Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_trace.h | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/drm_trace.h b/drivers/gpu/drm/drm_trace.h index 11c6dd577e8ed..487bc3478efec 100644 --- a/drivers/gpu/drm/drm_trace.h +++ b/drivers/gpu/drm/drm_trace.h @@ -32,7 +32,7 @@ TRACE_EVENT(drm_vblank_event, __entry->high_prec ? "true" : "false") ); -TRACE_EVENT(drm_vblank_event_queued, +DECLARE_EVENT_CLASS(class_drm_vblank_event, TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), TP_ARGS(file, crtc, seq), TP_STRUCT__entry( @@ -45,25 +45,16 @@ TRACE_EVENT(drm_vblank_event_queued, __entry->crtc = crtc; __entry->seq = seq; ), - TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \ + TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, __entry->seq) ); - -TRACE_EVENT(drm_vblank_event_delivered, - TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), - TP_ARGS(file, crtc, seq), - TP_STRUCT__entry( - __field(struct drm_file *, file) - __field(int, crtc) - __field(unsigned int, seq) - ), - TP_fast_assign( - __entry->file = file; - __entry->crtc = crtc; - __entry->seq = seq; - ), - TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \ - __entry->seq) +DEFINE_EVENT(class_drm_vblank_event, drm_vblank_event_queued, + TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), + TP_ARGS(file, crtc, seq) +); +DEFINE_EVENT(class_drm_vblank_event, drm_vblank_event_delivered, + TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), + TP_ARGS(file, crtc, seq) ); #endif /* _DRM_TRACE_H_ */