From owner-freebsd-current@FreeBSD.ORG Sat Jan 29 15:21:30 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F28E16A4CE for ; Sat, 29 Jan 2005 15:21:30 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77BDF43D1F for ; Sat, 29 Jan 2005 15:21:29 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id j0TFLSPm046997; Sat, 29 Jan 2005 16:21:28 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Alexander Leidinger From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 29 Jan 2005 16:10:22 +0100." <20050129161022.0de822fe@Magellan.Leidinger.net> Date: Sat, 29 Jan 2005 16:21:28 +0100 Message-ID: <46996.1107012088@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: current@freebsd.org Subject: Re: We have a lot of duplicated code in the kernel X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jan 2005 15:21:30 -0000 In message <20050129161022.0de822fe@Magellan.Leidinger.net>, Alexander Leidinger writes: >Hi, > >http://www.leidinger.net/FreeBSD/simian-20-sys-20050129.log (253k) >contains a log of duplicated code in /sys (-current as of today). The >file starts with files with 20 consecutive lines of duplicated code and >ends with two files which share 1108 lines of code. > >If I let the program detect 6 consecutive lines of duplicated code, it >is also able to detect possible code reuse in the same file, but it also >prints a lot of "noise" then. > >I've filtered the list for some false positives (twa_fwimg, trlld?m, >if_patm_rtables), if someone else notices some more files please tell me >about them and I add them to the filter. And we'll soon see the tool which generates this in src/tools/tools somewhere I hope ? :-) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.