Message ID | TY1PR01MB16922AA139B87F94F3E0125896090@TY1PR01MB1692.jpnprd01.prod.outlook.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <ltsi-dev-bounces@lists.linuxfoundation.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BB1F4175A for <patchwork-ltsi-dev@patchwork.kernel.org>; Wed, 29 Aug 2018 12:41:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A93522B00B for <patchwork-ltsi-dev@patchwork.kernel.org>; Wed, 29 Aug 2018 12:41:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C8182B012; Wed, 29 Aug 2018 12:41:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8746C2B00B for <patchwork-ltsi-dev@patchwork.kernel.org>; Wed, 29 Aug 2018 12:41:44 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E58B4D66; Wed, 29 Aug 2018 12:36:48 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 17FDDD4F for <ltsi-dev@lists.linuxfoundation.org>; Wed, 29 Aug 2018 12:36:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx05.melco.co.jp (mx05.melco.co.jp [192.218.140.145]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 614B87CA for <ltsi-dev@lists.linuxfoundation.org>; Wed, 29 Aug 2018 12:36:38 +0000 (UTC) Received: from mr05.melco.co.jp (mr05 [133.141.98.165]) by mx05.melco.co.jp (Postfix) with ESMTP id 497293A3268 for <ltsi-dev@lists.linuxfoundation.org>; Wed, 29 Aug 2018 21:18:08 +0900 (JST) Received: from mr05.melco.co.jp (unknown [127.0.0.1]) by mr05.imss (Postfix) with ESMTP id 420l5D21TKzRkCl for <ltsi-dev@lists.linuxfoundation.org>; Wed, 29 Aug 2018 21:18:08 +0900 (JST) Received: from mf03_second.melco.co.jp (unknown [192.168.20.183]) by mr05.melco.co.jp (Postfix) with ESMTP id 420l5D1jY5zRkC3 for <ltsi-dev@lists.linuxfoundation.org>; Wed, 29 Aug 2018 21:18:08 +0900 (JST) Received: from mf03.melco.co.jp (unknown [133.141.98.183]) by mf03_second.melco.co.jp (Postfix) with ESMTP id 420l5D1GPXzRk8v for <ltsi-dev@lists.linuxfoundation.org>; Wed, 29 Aug 2018 21:18:08 +0900 (JST) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (unknown [23.103.139.182]) by mf03.melco.co.jp (Postfix) with ESMTP id 420l5D13tbzRk38 for <ltsi-dev@lists.linuxfoundation.org>; Wed, 29 Aug 2018 21:18:08 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mitsubishielectricgroup.onmicrosoft.com; s=selector1-mitsubishielectricgroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q78wS8UYvHUFOX7lsN37EnxPTC5bzkpg+pe2J33vujw=; b=G6z92QGgv7amIZlxzms3Z4YzpnEvQgokBz4+2FDzci2hnJMUbD8FkJ8NRnK/hstuCeGf3DaI7IFkjh0bTMJh+3eGaZIwfOrhpZzcQAMpus9HQNQMITI2/+qOpU1OV0X7x62dN39KiuPoU7rYu/NSOUDtWmuSB5b4ymu+ydAXyj4= Received: from TY1PR01MB1692.jpnprd01.prod.outlook.com (52.133.160.145) by TY1PR01MB0762.jpnprd01.prod.outlook.com (10.167.158.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Wed, 29 Aug 2018 12:18:07 +0000 Received: from TY1PR01MB1692.jpnprd01.prod.outlook.com ([fe80::d04e:e6f6:c782:22fa]) by TY1PR01MB1692.jpnprd01.prod.outlook.com ([fe80::d04e:e6f6:c782:22fa%2]) with mapi id 15.20.1080.015; Wed, 29 Aug 2018 12:18:07 +0000 From: "Motai.Hirotaka@aj.MitsubishiElectric.co.jp" <Motai.Hirotaka@aj.MitsubishiElectric.co.jp> To: "ltsi-dev@lists.linuxfoundation.org" <ltsi-dev@lists.linuxfoundation.org> Thread-Topic: [LTSI-dev] [PATCH 42/54] tracing: Use the ring-buffer nesting to allow synthetic events to be traced Thread-Index: AdQ/jNz64XJRBUq7RW2LXhAk7vKCdg== Date: Wed, 29 Aug 2018 12:17:11 +0000 Deferred-Delivery: Wed, 29 Aug 2018 12:15:00 +0000 Message-ID: <TY1PR01MB16922AA139B87F94F3E0125896090@TY1PR01MB1692.jpnprd01.prod.outlook.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-melpop: 1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Motai.Hirotaka@aj.MitsubishiElectric.co.jp; x-originating-ip: [153.231.200.201] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; TY1PR01MB0762; 6:QE1KcRqFZH+GcQx+uuSi5YRPv/9szZIe9sqa1naU9ZT71DfwHWts55aErlqfpVQWtvxV3vwOpf8A5716UCVrU7LoCp5BKpZz6ag9IU2fHvXIdH2qqsItKqTGaSkZzwGTjxR31IiiuBzou+zLEO51ENc6PyOwuyaC+yIG8PxiTR7u0a+v75T2OlEApXO4uYXmobxQzp8fAeEgi01W8Gr0PSX3xEE45VE0LFXfPoCWgSew98wulAz8xYD+bX3K7vE75K46AdN1K2akjWkliLSh3dCgnt7NI7fGKBrReKyepSQT2oa1CwAB1+3MmpgYilAwQRPF9IW+tofuLu4CIf0/CTAmN2pXlhDEMu21P/y7rqDs+jrI4nDbEJxaoeTSfxsObSrogT2M4HSbNLPMTnMNwuYfdo91vXyFsIf2evA4HCO6d3MzTLIVycZWjd0QWicALTOgAA4IAIakF34aRn/AqA==; 5:Olp/7xIgh6OyMAxjjQOYgCK9Ai/FNMFb9XwvrBfnmeG8hlQpQrho8SKU3N5puFhnDopufQ5wFetv6RhEtEKutDWjyYu0LiSX/rtrw2c9OC7NC1/7tTJneNxX66CY7tEK6gY6BEKAfmkhUdPsL0VhwKbpzMT01nUFvj4+sEdRY/M=; 7:gy98qM1gmrFUWsOjEH1QXbMfkOsrnk0Pikzuongx1eaY4WD17tph4PZx5rgsfZydONEqyPFEV+cj9YFQjpMEsD93g+1rp3mv5JJDRagVh9S/O9ypK5QlAFkDgrLkBTN7vkDQhW94+kRtwq4q0euQxARRekHaX9GyjThOWTRP90yFjen7IaFWR8iKDMxWpZmibXn4vHpYjJIrFU9+ETkk0ZMzmT8JkVhwIW5FeTbzy816bqmGSpfeKcAYyl8gSrAg x-ms-office365-filtering-correlation-id: 708fa445-7865-4bee-d742-08d60da97a87 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:TY1PR01MB0762; x-ms-traffictypediagnostic: TY1PR01MB0762: x-microsoft-antispam-prvs: <TY1PR01MB0762AA42DFEEBDAB0153B2CE96090@TY1PR01MB0762.jpnprd01.prod.outlook.com> x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016); SRVR:TY1PR01MB0762; BCL:0; PCL:0; RULEID:; SRVR:TY1PR01MB0762; x-forefront-prvs: 077929D941 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(396003)(346002)(376002)(136003)(366004)(199004)(189003)(7696005)(186003)(72206003)(6116002)(478600001)(3846002)(1857600001)(256004)(74482002)(5250100002)(5660300001)(14444005)(2501003)(99286004)(2900100001)(8936002)(53936002)(68736007)(33656002)(9686003)(2906002)(97736004)(26005)(476003)(7736002)(305945005)(74316002)(6666003)(316002)(14454004)(486006)(55016002)(81166006)(5640700003)(66066001)(8676002)(86362001)(6436002)(2351001)(6506007)(106356001)(25786009)(6916009)(105586002)(102836004)(575784001)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR01MB0762; H:TY1PR01MB1692.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1; received-spf: None (protection.outlook.com: aj.MitsubishiElectric.co.jp does not designate permitted sender hosts) x-microsoft-antispam-message-info: t9l+fACaPBghserQDoL2X0d5YpA70q+xE9FS/1nJZstd4b1QFcqs4jeRkZvnLhj70QgGdd4bvZJC45bc5GldqKjQEuMqm0bfrU/uydctJsC43wzSpETfwyTWfkGfVSJXUgizFx/7gj2Kj4ALasIEPzQ15LD1AaB5Vy03Rs3quCWWTwn2uDh16hU+LhX5FthYEaA+Dd3Kr9JR4+GBmS1EaK/m/0EohpYriPWAMV1WpsVpqJy4d9M4HWOo1Dmi+KIR/IkuHNX6/aidn659Tq/kESmRoDwqw1q3pAbemVqx2trxA9ccjtF39ClGbaD9KWdLSkLa8Hp+l0/kEVxC15fCmEcDYIm0zrd1YYCWfb1ZZac= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: aj.MitsubishiElectric.co.jp X-MS-Exchange-CrossTenant-Network-Message-Id: 708fa445-7865-4bee-d742-08d60da97a87 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2018 12:17:22.6467 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c5a75b62-4bff-4c96-a720-6621ce9978e5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR01MB0762 Subject: [LTSI-dev] [PATCH 42/54] tracing: Use the ring-buffer nesting to allow synthetic events to be traced X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" <ltsi-dev.lists.linuxfoundation.org> List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/ltsi-dev>, <mailto:ltsi-dev-request@lists.linuxfoundation.org?subject=unsubscribe> List-Archive: <http://lists.linuxfoundation.org/pipermail/ltsi-dev/> List-Post: <mailto:ltsi-dev@lists.linuxfoundation.org> List-Help: <mailto:ltsi-dev-request@lists.linuxfoundation.org?subject=help> List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev>, <mailto:ltsi-dev-request@lists.linuxfoundation.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[01/54] tracing: Remove redundant unread variable ret
|
expand
|
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index f7d0da20..4f027642 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -635,46 +635,56 @@ static struct trace_event_functions synth_event_funcs = { static notrace void trace_event_raw_event_synth(void *__data, u64 *var_ref_vals, unsigned int var_ref_idx) { struct trace_event_file *trace_file = __data; struct synth_trace_event *entry; struct trace_event_buffer fbuffer; + struct ring_buffer *buffer; struct synth_event *event; unsigned int i, n_u64; int fields_size = 0; event = trace_file->event_call->data; if (trace_trigger_soft_disabled(trace_file)) return; fields_size = event->n_u64 * sizeof(u64); + /* + * Avoid ring buffer recursion detection, as this event + * is being performed within another event. + */ + buffer = trace_file->tr->trace_buffer.buffer; + ring_buffer_nest_start(buffer); + entry = trace_event_buffer_reserve(&fbuffer, trace_file, sizeof(*entry) + fields_size); if (!entry) - return; + goto out; for (i = 0, n_u64 = 0; i < event->n_fields; i++) { if (event->fields[i]->is_string) { char *str_val = (char *)(long)var_ref_vals[var_ref_idx + i]; char *str_field = (char *)&entry->fields[n_u64]; strncpy(str_field, str_val, STR_VAR_LEN_MAX); n_u64 += STR_VAR_LEN_MAX / sizeof(u64); } else { entry->fields[n_u64] = var_ref_vals[var_ref_idx + i]; n_u64++; } } trace_event_buffer_commit(&fbuffer); +out: + ring_buffer_nest_end(buffer); } static void free_synth_event_print_fmt(struct trace_event_call *call) { if (call) { kfree(call->print_fmt); call->print_fmt = NULL; }