From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars Kurth Subject: Re: Enhancing Xen's Kconfig infrastructure to support tailored solutions Date: Mon, 18 Feb 2019 12:54:55 +0000 Message-ID: References: <5C653AB10200007800216997@prv1-mh.provo.novell.com> <20190215110807.jtybxyfl523vwo3y@zion.uk.xensource.com> <20190218111234.r7ae42wswy2hjo7k@zion.uk.xensource.com> <1636EB19-FE45-42FF-B4D3-8CE8853BD040@gmail.com> <20190218112337.qoyws3pedxav4wmf@zion.uk.xensource.com> <59568551-146c-e0b7-2f94-4f9ee19c5325@citrix.com> <1B830543-1B7B-4DF4-8D1E-FB862FEE836C@gmail.com> <20190218115712.s7os5yx5sxvqq7n4@zion.uk.xensource.com> <775bed6a-1c35-3614-9a86-4fcedf84acd4@citrix.com> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: multipart/mixed; boundary="===============1421118980940459266==" Return-path: In-Reply-To: <775bed6a-1c35-3614-9a86-4fcedf84acd4@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" To: George Dunlap Cc: James McKenzie , Stefano Stabellini , Wei Liu , 'Jan Beulich' , Daniel Smith , Andrew Cooper , Doug Goldstein , Christopher Clark , Marek Marczykowski , "Daniel P.Smith" , robin.randhawa@arm.com, committers@xenproject.org, Suravee Suthikulpanit , Jun Nakajima , Stewart Hildebrand , xen-devel , Paul Durrant List-Id: xen-devel@lists.xenproject.org --===============1421118980940459266== Content-Type: multipart/alternative; boundary="Apple-Mail=_071A515E-7DF6-470B-A667-BEB211AB7156" --Apple-Mail=_071A515E-7DF6-470B-A667-BEB211AB7156 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 18 Feb 2019, at 12:16, George Dunlap = wrote: >=20 > On 2/18/19 12:11 PM, George Dunlap wrote: >> On 2/18/19 12:01 PM, Andrew Cooper wrote: >>> On 18/02/2019 11:57, Wei Liu wrote: >>>> On Mon, Feb 18, 2019 at 11:53:15AM +0000, Lars Kurth wrote: >>>>>=20 >>>>>> On 18 Feb 2019, at 11:30, George Dunlap = wrote: >>>>>>=20 >>>>>> On 2/18/19 11:23 AM, Wei Liu wrote: >>>>>>> On Mon, Feb 18, 2019 at 11:17:56AM +0000, Lars Kurth wrote: >>>>>>>> Thank you Wei. It's interesting though that the full vs HVM = only is almost identical in terms of SLOC's >>>>>>>> Lars >>>>>>> The cloc target counts the files in the dependency graph = generated by >>>>>>> make. >>>>> Do we know for sure that CLOC counts everything in a file or does = it honour the pre-processor settings? >>>> We certainly don't feed any preprocessor defines to it. I doubt it >>>> understand C to that level of details anyway. >>>=20 >>> LoC isn't a fantastic metric under any circumstance. >>>=20 >>> Bigger code is definitely better, if the reason it is bigger is = because >>> it is because it is formatted for readability/clarity etc. >>>=20 >>> Attempting to optimise for smaller LoC, other than making entire >>> functional areas optional, is usually short sighted. >>=20 >> For instance, we could probably decrease the LoC by nearly 20k by >> changing the style not to give the opening bracket its own line: >>=20 >> $ find . -name '*.c' | xargs grep '^[[:space:]]*{' | wc -l >> 19896 >> $ find . -name '*.[ch]' | xargs grep '^[[:space:]]*{' | wc -l >> 21847 >=20 > This is hypervisor only BTW (run from xen.git/xen). >=20 > It is a bit mind-boggling to think that there are more open brackets = in > the Xen code base than there is PV-specific code. O_o As we have the same coding conventions across hypervisor code, that = shouldn't make a difference Lars= --Apple-Mail=_071A515E-7DF6-470B-A667-BEB211AB7156 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On 18 Feb 2019, at 12:16, George Dunlap <george.dunlap@citrix.com> wrote:

On 2/18/19 = 12:11 PM, George Dunlap wrote:
On 2/18/19 12:01 PM, Andrew Cooper = wrote:
On 18/02/2019 = 11:57, Wei Liu wrote:
On Mon, Feb 18, 2019 at 11:53:15AM +0000, Lars Kurth = wrote:

On 18 Feb 2019, at = 11:30, George Dunlap <george.dunlap@citrix.com> wrote:

On 2/18/19 11:23 AM, Wei Liu wrote:
On Mon, Feb 18, 2019 at 11:17:56AM +0000, Lars = Kurth wrote:
Thank = you Wei. It's interesting though that the full vs HVM only is almost = identical in terms of SLOC's
Lars
The cloc target counts the files in the = dependency graph generated by
make.
Do we know for sure that CLOC = counts everything in a file or does it honour the pre-processor = settings?
We certainly don't feed any = preprocessor defines to it. I doubt it
understand C to = that level of details anyway.

LoC isn't a fantastic metric under any circumstance.

Bigger code is definitely better, if the = reason it is bigger is because
it is because it is = formatted for readability/clarity etc.

Attempting to optimise for smaller LoC, other than making = entire
functional areas optional, is usually short = sighted.

For instance, we = could probably decrease the LoC by nearly 20k by
changing = the style not to give the opening bracket its own line:

$ find . -name '*.c' | xargs grep '^[[:space:]]*{' | wc -l
19896
$ find . -name '*.[ch]' | xargs grep = '^[[:space:]]*{' | wc -l
21847

This is hypervisor only BTW (run from xen.git/xen).

It is a bit = mind-boggling to think that there are more open brackets in
the Xen code = base than there is PV-specific code. O_o

As we have the same coding conventions across = hypervisor code, that shouldn't make a difference
Lars
= --Apple-Mail=_071A515E-7DF6-470B-A667-BEB211AB7156-- --===============1421118980940459266== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============1421118980940459266==--