Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755244AbaF3I5R (ORCPT ); Mon, 30 Jun 2014 04:57:17 -0400 Received: from mail-qc0-f171.google.com ([209.85.216.171]:51192 "EHLO mail-qc0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755163AbaF3I5O (ORCPT ); Mon, 30 Jun 2014 04:57:14 -0400 MIME-Version: 1.0 Date: Mon, 30 Jun 2014 01:57:13 -0700 X-Google-Sender-Auth: 7Iwam5svylYIBmtVrnJcH95nbv4 Message-ID: Subject: [PATCH] sparse: Add CLOG option for saving warning From: Christopher Li To: linux-kernel Cc: Linux-Sparse , Sam Ravnborg , Andrew Morton , Josh Triplett Content-Type: multipart/mixed; boundary=001a113a76ca62b5ba04fd09d8a3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --001a113a76ca62b5ba04fd09d8a3 Content-Type: text/plain; charset=ISO-8859-1 Currently sparse warning only output to stderr. In the parallel build process, different source file output is fixed together. It is hard to keep track of the warning. Add the CLOG= option in command line to save the sparse warning into individual log file. Typical usage: make -j8 C=2 CLOG= The log file is saved in the target directory as .xxx.o..sparse By diffing between different log file, it is much easier to analyze how the sparse change impact the whole kernel build. Signed-off-by: Christopher Li Chris --001a113a76ca62b5ba04fd09d8a3 Content-Type: text/x-patch; charset=US-ASCII; name="0001-sparse-Add-CLOG-option-for-saving-warning.patch" Content-Disposition: attachment; filename="0001-sparse-Add-CLOG-option-for-saving-warning.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hx1jvqmh0 RnJvbSAzYjJmZjIwNGNiZGE2ODRhZGY5ZGJhMmFkZjU2ODA2MjUzM2FlMzRkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBDaHJpc3RvcGhlciBMaSA8c3BhcnNlQGNocmlzbGkub3JnPgpE YXRlOiBNb24sIDMwIEp1biAyMDE0IDAxOjMzOjIyIC0w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fbG9nZ2luZykgOwogIyBMaW51cycga2Vy bmVsIHNhbml0eSBjaGVja2luZyB0b29sCiBpZm5lcSAoJChLQlVJTERfQ0hFQ0tTUkMpLDApCiAg IGlmZXEgKCQoS0JVSUxEX0NIRUNLU1JDKSwyKQogICAgIHF1aWV0X2NtZF9mb3JjZV9jaGVja3Ny YyA9IENIRUNLICAgJDwKLSAgICAgICAgICBjbWRfZm9yY2VfY2hlY2tzcmMgPSAkKENIRUNLKSAk KENIRUNLRkxBR1MpICQoY19mbGFncykgJDwgOworICAgICAgICAgIGNtZF9mb3JjZV9jaGVja3Ny YyA9ICQoY21kX2NoZWNrKQogICBlbHNlCiAgICAgICBxdWlldF9jbWRfY2hlY2tzcmMgICAgID0g Q0hFQ0sgICAkPAotICAgICAgICAgICAgY21kX2NoZWNrc3JjICAgICA9ICQoQ0hFQ0spICQoQ0hF Q0tGTEFHUykgJChjX2ZsYWdzKSAkPCA7CisgICAgICAgICAgICBjbWRfY2hlY2tzcmMgICAgID0g JChjbWRfY2hlY2spCiAgIGVuZGlmCiBlbmRpZgogCi0tIAoxLjkuMwoK --001a113a76ca62b5ba04fd09d8a3-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/