Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1650647ybt; Sat, 11 Jul 2020 18:16:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3/okWEp7UP4dPMfqx/na78Qk7kpPOdRWhnF75Xshc4EP4ifgPsqFJCUnls67rPNO4BAVe X-Received: by 2002:a17:906:2c02:: with SMTP id e2mr50472593ejh.64.1594516575069; Sat, 11 Jul 2020 18:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594516575; cv=none; d=google.com; s=arc-20160816; b=mFFmcAPRpDlI1epN6us6H6ctybTf8l/CMnW24TI3nEDqAs55/tmCcn3eiifQx6VU8f nkkpGGxXeYoHRmFY8ZvwHV+PIa7xw5ZK0UmUywXvVuaCE4Hg2WZZ6Vue0BFKyNzzqkQf T5OfN280Y9BTuPgDOs1XVPHVAc2zwsWY1JiDwuS+ydzgjQritLs/vb/0eSoUL+wA9YHk ieBK2wLJH3hMrKt3M1+WsI1xrWRTwKTPb/GqfPgamk1+E7xS1IkprC/UW8ToOZRmScON ict4eTBONzzvYQcpL4TOW18Gm5ml22Iok5WUTEL3GFaEtSixhhViSd9nHjoqA0cGV3cx VSyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MrvCLj9KBgvHbjVGyRVJMwi80OMOy5bjqv3lvmOG324=; b=RxbM4QQpz+DODsQNRXTnVLY/kkXKkSu0xBp8v0iW0LJFFXEAR6hvfpymKcTBhdJaNQ ylmlQKLDDVgMWCdzQseTgK7V/O8ZMWPWikXx40yJKZyjyV12HHBXLTqmCsfyYZJAd0WL UJHB3hhgvg/uunwyMJ+WURlQTyX3uNR9dv+KCAoDayvZ4pjtsQR8j/1vf77t7bUIMVo+ /2+spDner3OKjDSggnLTLmz0ozBPTyQeyGYLtFfEX7ZbSCjMjfGht3+m/1f62+fchH+2 tKlxHXbyzQbpDaG1DBiyYMlrWEkConJuAbudrBTK74NV9pXb83pR7qJqfFyHsHL9l5mS iGew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c102si7999977edf.216.2020.07.11.18.15.52; Sat, 11 Jul 2020 18:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728197AbgGLBLp (ORCPT + 99 others); Sat, 11 Jul 2020 21:11:45 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:53205 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728137AbgGLBLi (ORCPT ); Sat, 11 Jul 2020 21:11:38 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07484;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0U2PGA0b_1594516294; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U2PGA0b_1594516294) by smtp.aliyun-inc.com(127.0.0.1); Sun, 12 Jul 2020 09:11:34 +0800 From: Wei Yang To: rostedt@goodmis.org, mingo@redhat.com Cc: linux-kernel@vger.kernel.org, Wei Yang Subject: [Patch v2 2/4] tracing: save one trace_event->type by using __TRACE_LAST_TYPE Date: Sun, 12 Jul 2020 09:10:34 +0800 Message-Id: <20200712011036.70948-3-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20200712011036.70948-1-richard.weiyang@linux.alibaba.com> References: <20200712011036.70948-1-richard.weiyang@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Static defined trace_event->type stops at (__TRACE_LAST_TYPE - 1) and dynamic trace_event->type starts from (__TRACE_LAST_TYPE + 1). To save one trace_event->type index, let's use __TRACE_LAST_TYPE. Signed-off-by: Wei Yang --- kernel/trace/trace_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index a35232d61601..4d1893564912 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -20,7 +20,7 @@ DECLARE_RWSEM(trace_event_sem); static struct hlist_head event_hash[EVENT_HASHSIZE] __read_mostly; -static int next_event_type = __TRACE_LAST_TYPE + 1; +static int next_event_type = __TRACE_LAST_TYPE; enum print_line_t trace_print_bputs_msg_only(struct trace_iterator *iter) { @@ -675,7 +675,7 @@ static LIST_HEAD(ftrace_event_list); static int trace_search_list(struct list_head **list) { struct trace_event *e; - int next = __TRACE_LAST_TYPE + 1; + int next = __TRACE_LAST_TYPE; if (list_empty(&ftrace_event_list)) { *list = &ftrace_event_list; -- 2.20.1 (Apple Git-117)