diff options
author | Mcgrof <anonymous.contributor@example.org> | 2016-03-22 19:03:21 +0000 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2024-10-04 15:47:33 -0400 |
commit | 125a3bdc02be5136f524770e75651558ab7b2e9c (patch) | |
tree | 8c3233e4c116aa64861b0e4d5580db732202e83c | |
parent | 49f9b2b2c122e500a6a1a3c06950e2fb8ff118a2 (diff) | |
download | backports-125a3bdc02be5136f524770e75651558ab7b2e9c.tar.gz |
Update Documentation/backports/hacking
-rw-r--r-- | wiki/Documentation_backports_hacking.mediawiki | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/wiki/Documentation_backports_hacking.mediawiki b/wiki/Documentation_backports_hacking.mediawiki index faa307e..08452b7 100644 --- a/wiki/Documentation_backports_hacking.mediawiki +++ b/wiki/Documentation_backports_hacking.mediawiki @@ -152,6 +152,79 @@ works of the Linux kernel'''. Feel free to any backport subsystems. The requirement is you at least list its kernel dependency and also that you have tested compilation success with ckmake. If you are adding a new subsystem we are in hopes you will also help maintain it. += Generating backports stats = + +To help backports developers evaluate the gains of use of Coccinelle SmPL a tool has been written as part of the work done towards the [http://coccinelle.lip6.fr/papers/backport_edcc15.pdf Increasing Automation in the Backporting of Linux Drivers Using Coccinelle paper], the tool has a temporary git tree on github, integration of the tool into the upstream backports tree is desirable but porting of the tool to Python must be done first. Below are instructions on how to use the tool to get stats on the latest tree. The statistics give a slew of metrics over the gains of using of Coccinelle towards automatically backporting the Linux kernel on each release. + +First git clone upstream backports git tree, and have a linux-next tree available (using Linus' tree is possible as well, you just need to use the respective stable backports branch). Then generate a backports release using --gitdebug so that each step of the backports process creates a commit. This lets the tool evaluate the impact of using Coccinelle at each step. Assuming you have backports cloned on ~/backports/ and the latest linux-next tree with the respective linux-next tag associated with the latest backports tree tag you would do: + +<code> +cd linux-next +git reset --hard next-20151218 + +cd ~/backports/ + +mkdir -p ~/build/ +rm -rf ~/build/backports-20151218 +./gentree.py --gitdebug ~/linux-next ~/build/backports-20151218 +</code> + +Now go get the temporary backports stats tool and copy over the required binary and script: + +<code> +cd ~/ +git clone https://github.com/mcgrof/backports-cocci-stats.git +cd backports-cocci-stats +make + +cp gen-cocci-stats.sh ~/build/backports-20151218/ +cp clean ~/build/backports-20151218/ +</code> + +Now generate the stats, you should see something like this: + +<code> +mcgrof@ergon ~/build/backports-20151218 (git::master)$ ./gen-cocci-stats.sh +----------------------------------------------------------------------------- +Development and Maintenance efficiency metrics: +----------------------------------------------------------------------------- + dev-efficiency maint-efficiency diff-wc diffstat clean SmPL-Patch + 0.555556 2.33333 21 5 9 0065-ndisc_send_na-argument.cocci + 2.75 8 64 22 8 0062-iff-no-queue.cocci + 0.666667 1.88889 17 6 9 skb_no_xmit_more.cocci + 1.16667 2.79167 67 28 24 ptp_getsettime64.cocci + 0.142857 1 14 2 14 features_check.cocci + 1.18182 5.45455 60 13 11 0055-netdev-tstats.cocci + 1.55906 3.55118 451 198 127 0054-struct-proto_ops-sig.cocci + 0.666667 1.88889 17 6 9 no-pfmemalloc.cocci + 0.634146 1.4878 61 26 41 set_vf_rate.cocci + 3.75 10.625 85 30 8 igb_pci_error_handlers.cocci + 1.07692 4.23077 55 14 13 ethtool_cmd_mdix.cocci + 0.588235 1.23529 21 10 17 rxnfc.cocci + 0.285714 1.53571 43 8 28 get_module.cocci + 0.285714 1.53571 43 8 28 ethtool_eee.cocci + 0.714286 2.28571 16 5 7 skb_no_fcs.cocci + 0.25 1.59375 51 8 32 set_vf_spoofchk.cocci + 0.428571 2.85714 40 6 14 sriov_configure.cocci + 0.87037 2.7037 146 47 54 0031-sk_data_ready.cocci + 4.4 17.9 179 44 10 genl-const.cocci + 7.11111 49.6667 447 64 9 0019-usb_driver_lpm.cocci + 0.571429 4.14286 58 8 14 get_ts_info.cocci + 11.5333 45.4 681 173 15 0001-netlink-portid.cocci + 2.96667 16.35 981 178 60 0002-no_dmabuf.cocci + 0.444444 1.77778 32 8 18 0002-gpio-parent.cocci + 0.512821 1.89744 74 20 39 0002-group_attr_bus.cocci + 0.769231 2.79487 109 30 39 0001-group_attr_class.cocci + 1.47184 5.6484 3711 967 657 all-SmPL.cocci +----------------------------------------------------------------------------- +Patch total diff wc -l: 3075 +SmPL total diff wc -l: 3711 +Total total diff wc -l: 6786 +--------------------------------------- +Patch diff % contribution: 45.3139 +SmPL diff % contribution: 54.6861 +</code> + = TODO = Go read the full [[Documentation/backports/hacking/todo|TODO list]] on its own page. |