diff options
| author | Koen Kooi <koen@dominion.thruhere.net> | 2011-09-27 13:02:26 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-09-27 13:02:26 +0200 |
| commit | 92edaa1967d6478683f06c4fcc438a94228a6c9e (patch) | |
| tree | 834d16987fe1d1c7203eb0880455acaa559ea465 | |
| parent | fb0d50c16fafb6956a94c472b7c6a74a456e38b6 (diff) | |
| download | meta-openembedded-92edaa1967d6478683f06c4fcc438a94228a6c9e.tar.gz | |
systemd: replace analyze patch with upstream version
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
| -rw-r--r-- | meta-oe/recipes-core/systemd/systemd/0003-analyze-draw-kernel-boot-time-as-well.patch | 88 | ||||
| -rw-r--r-- | meta-oe/recipes-core/systemd/systemd_git.bb | 2 |
2 files changed, 60 insertions, 30 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd/0003-analyze-draw-kernel-boot-time-as-well.patch b/meta-oe/recipes-core/systemd/systemd/0003-analyze-draw-kernel-boot-time-as-well.patch index 670800d087..ef282aab30 100644 --- a/meta-oe/recipes-core/systemd/systemd/0003-analyze-draw-kernel-boot-time-as-well.patch +++ b/meta-oe/recipes-core/systemd/systemd/0003-analyze-draw-kernel-boot-time-as-well.patch | |||
| @@ -1,69 +1,90 @@ | |||
| 1 | From 3dd45de5dffb30f3b32490736eb56024a79f51c4 Mon Sep 17 00:00:00 2001 | 1 | From 958ae0d75176a65dc6694829667a5cc9fead8cbc Mon Sep 17 00:00:00 2001 |
| 2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Kay Sievers <kay.sievers@vrfy.org> |
| 3 | Date: Thu, 22 Sep 2011 15:24:32 +0200 | 3 | Date: Tue, 27 Sep 2011 12:52:09 +0200 |
| 4 | Subject: [PATCH 3/3] analyze: draw kernel boot time as well | 4 | Subject: [PATCH] analyze: always draw top kernel, initramfs, userspace bars |
| 5 | 5 | ||
| 6 | Sample output: http://dominion.thruhere.net/koen/angstrom/systemd/omap4430-panda-201109221422.svg | 6 | Based on Koen Kooi's patch. Renamed initrd to initramfs. |
| 7 | |||
| 8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
| 9 | --- | 7 | --- |
| 10 | 8 | src/systemd-analyze | 41 ++++++++++++++++++++++++++++++++--------- | |
| 11 | This is just a start to see if something like this is acceptable, feedback welcome! | 9 | 1 files changed, 32 insertions(+), 9 deletions(-) |
| 12 | |||
| 13 | src/systemd-analyze | 20 +++++++++++++------- | ||
| 14 | 1 files changed, 13 insertions(+), 7 deletions(-) | ||
| 15 | 10 | ||
| 16 | diff --git a/src/systemd-analyze b/src/systemd-analyze | 11 | diff --git a/src/systemd-analyze b/src/systemd-analyze |
| 17 | index d0db984..480f7aa 100755 | 12 | index ac64040..729aa05 100755 |
| 18 | --- a/src/systemd-analyze | 13 | --- a/src/systemd-analyze |
| 19 | +++ b/src/systemd-analyze | 14 | +++ b/src/systemd-analyze |
| 20 | @@ -116,7 +116,8 @@ elif sys.argv[1] == 'plot': | 15 | @@ -82,7 +82,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == 'time': |
| 16 | initrd_time, start_time, finish_time = acquire_start_time() | ||
| 17 | |||
| 18 | if initrd_time > 0: | ||
| 19 | - print "Startup finished in %lums (kernel) + %lums (initrd) + %lums (userspace) = %lums" % ( \ | ||
| 20 | + print "Startup finished in %lums (kernel) + %lums (initramfs) + %lums (userspace) = %lums" % ( \ | ||
| 21 | initrd_time/1000, \ | ||
| 22 | (start_time - initrd_time)/1000, \ | ||
| 23 | (finish_time - start_time)/1000, \ | ||
| 24 | @@ -116,7 +116,11 @@ elif sys.argv[1] == 'plot': | ||
| 21 | data = acquire_time_data() | 25 | data = acquire_time_data() |
| 22 | s = sorted(data, key = lambda i: i[1]) | 26 | s = sorted(data, key = lambda i: i[1]) |
| 23 | 27 | ||
| 24 | - count = 0 | 28 | - count = 0 |
| 25 | + # start at one to account for the kernel bar | 29 | + # Account for kernel and initramfs bars if they exist |
| 26 | + count = 1 | 30 | + if initrd_time > 0: |
| 31 | + count = 3 | ||
| 32 | + else: | ||
| 33 | + count = 2 | ||
| 27 | 34 | ||
| 28 | for name, ixt, aet, axt, iet in s: | 35 | for name, ixt, aet, axt, iet in s: |
| 29 | 36 | ||
| 30 | @@ -130,7 +131,7 @@ elif sys.argv[1] == 'plot': | 37 | @@ -130,7 +134,7 @@ elif sys.argv[1] == 'plot': |
| 31 | bar_space = bar_height * 0.1 | 38 | bar_space = bar_height * 0.1 |
| 32 | 39 | ||
| 33 | # 1000px = 10s, 1px = 10ms | 40 | # 1000px = 10s, 1px = 10ms |
| 34 | - width = (finish_time - start_time)/10000 + border*2 | 41 | - width = (finish_time - start_time)/10000 + border*2 |
| 35 | + width = (finish_time)/10000 + border*2 | 42 | + width = finish_time/10000 + border*2 |
| 36 | height = count * (bar_height + bar_space) + border * 2 | 43 | height = count * (bar_height + bar_space) + border * 2 |
| 37 | 44 | ||
| 38 | if width < 1000: | 45 | if width < 1000: |
| 39 | @@ -147,7 +148,7 @@ elif sys.argv[1] == 'plot': | 46 | @@ -147,7 +151,7 @@ elif sys.argv[1] == 'plot': |
| 40 | context.set_line_width(1) | 47 | context.set_line_width(1) |
| 41 | context.set_source_rgb(0.7, 0.7, 0.7) | 48 | context.set_source_rgb(0.7, 0.7, 0.7) |
| 42 | 49 | ||
| 43 | - for x in range(0, max((finish_time - start_time)/10000,110), 100): | 50 | - for x in range(0, max((finish_time - start_time)/10000,110), 100): |
| 44 | + for x in range(0, max((finish_time)/10000,110), 100): | 51 | + for x in range(0, finish_time/10000 + 100, 100): |
| 45 | context.move_to(x, 0) | 52 | context.move_to(x, 0) |
| 46 | context.line_to(x, height-border*2) | 53 | context.line_to(x, height-border*2) |
| 47 | 54 | ||
| 48 | @@ -163,11 +164,16 @@ elif sys.argv[1] == 'plot': | 55 | @@ -163,11 +167,30 @@ elif sys.argv[1] == 'plot': |
| 49 | banner = "Running on %s (%s %s) %s" % (os.uname()[1], os.uname()[2], os.uname()[3], os.uname()[4]) | 56 | banner = "Running on %s (%s %s) %s" % (os.uname()[1], os.uname()[2], os.uname()[3], os.uname()[4]) |
| 50 | draw_text(context, 0, -15, banner, hcenter = 0, vcenter = 1) | 57 | draw_text(context, 0, -15, banner, hcenter = 0, vcenter = 1) |
| 51 | 58 | ||
| 52 | - for x in range(0, max((finish_time - start_time)/10000,110), 100): | 59 | - for x in range(0, max((finish_time - start_time)/10000,110), 100): |
| 53 | + for x in range(0, max((finish_time)/10000,110), 100): | 60 | + for x in range(0, finish_time/10000 + 100, 100): |
| 54 | draw_text(context, x, -5, "%lus" % (x/100), vcenter = 0, hcenter = 0) | 61 | draw_text(context, x, -5, "%lus" % (x/100), vcenter = 0, hcenter = 0) |
| 55 | 62 | ||
| 56 | y = 0 | 63 | y = 0 |
| 57 | 64 | ||
| 58 | + # draw box for kernel boot time | 65 | + # draw boxes for kernel and initramfs boot time |
| 59 | + draw_box(context, 0, y, start_time/10000, bar_height, 0.8, 0.6, 0.6) | 66 | + if initrd_time > 0: |
| 60 | + draw_text(context, 10, y + bar_height/2, "kernel", hcenter = 0) | 67 | + draw_box(context, 0, y, initrd_time/10000, bar_height, 0.7, 0.7, 0.7) |
| 68 | + draw_text(context, 10, y + bar_height/2, "kernel", hcenter = 0) | ||
| 69 | + y += bar_height + bar_space | ||
| 70 | + | ||
| 71 | + draw_box(context, initrd_time/10000, y, start_time/10000-initrd_time/10000, bar_height, 0.7, 0.7, 0.7) | ||
| 72 | + draw_text(context, initrd_time/10000 + 10, y + bar_height/2, "initramfs", hcenter = 0) | ||
| 73 | + y += bar_height + bar_space | ||
| 74 | + | ||
| 75 | + else: | ||
| 76 | + draw_box(context, 0, y, start_time/10000, bar_height, 0.6, 0.6, 0.6) | ||
| 77 | + draw_text(context, 10, y + bar_height/2, "kernel", hcenter = 0) | ||
| 78 | + y += bar_height + bar_space | ||
| 79 | + | ||
| 80 | + draw_box(context, start_time/10000, y, finish_time/10000-start_time/10000, bar_height, 0.7, 0.7, 0.7) | ||
| 81 | + draw_text(context, start_time/10000 + 10, y + bar_height/2, "userspace", hcenter = 0) | ||
| 61 | + y += bar_height + bar_space | 82 | + y += bar_height + bar_space |
| 62 | + | 83 | + |
| 63 | for name, ixt, aet, axt, iet in s: | 84 | for name, ixt, aet, axt, iet in s: |
| 64 | 85 | ||
| 65 | drawn = False | 86 | drawn = False |
| 66 | @@ -176,7 +182,7 @@ elif sys.argv[1] == 'plot': | 87 | @@ -176,7 +199,7 @@ elif sys.argv[1] == 'plot': |
| 67 | if ixt >= start_time and ixt <= finish_time: | 88 | if ixt >= start_time and ixt <= finish_time: |
| 68 | 89 | ||
| 69 | # Activating | 90 | # Activating |
| @@ -72,7 +93,7 @@ index d0db984..480f7aa 100755 | |||
| 72 | b = min(filter(lambda x: x >= ixt, (aet, axt, iet, finish_time))) - ixt | 93 | b = min(filter(lambda x: x >= ixt, (aet, axt, iet, finish_time))) - ixt |
| 73 | 94 | ||
| 74 | draw_box(context, a/10000, y, b/10000, bar_height, 1, 0, 0) | 95 | draw_box(context, a/10000, y, b/10000, bar_height, 1, 0, 0) |
| 75 | @@ -188,7 +194,7 @@ elif sys.argv[1] == 'plot': | 96 | @@ -188,7 +211,7 @@ elif sys.argv[1] == 'plot': |
| 76 | if aet >= start_time and aet <= finish_time: | 97 | if aet >= start_time and aet <= finish_time: |
| 77 | 98 | ||
| 78 | # Active | 99 | # Active |
| @@ -81,7 +102,7 @@ index d0db984..480f7aa 100755 | |||
| 81 | b = min(filter(lambda x: x >= aet, (axt, iet, finish_time))) - aet | 102 | b = min(filter(lambda x: x >= aet, (axt, iet, finish_time))) - aet |
| 82 | 103 | ||
| 83 | draw_box(context, a/10000, y, b/10000, bar_height, .8, .6, .6) | 104 | draw_box(context, a/10000, y, b/10000, bar_height, .8, .6, .6) |
| 84 | @@ -200,7 +206,7 @@ elif sys.argv[1] == 'plot': | 105 | @@ -200,7 +223,7 @@ elif sys.argv[1] == 'plot': |
| 85 | if axt >= start_time and axt <= finish_time: | 106 | if axt >= start_time and axt <= finish_time: |
| 86 | 107 | ||
| 87 | # Deactivating | 108 | # Deactivating |
| @@ -90,6 +111,15 @@ index d0db984..480f7aa 100755 | |||
| 90 | b = min(filter(lambda x: x >= axt, (iet, finish_time))) - axt | 111 | b = min(filter(lambda x: x >= axt, (iet, finish_time))) - axt |
| 91 | 112 | ||
| 92 | draw_box(context, a/10000, y, b/10000, bar_height, .6, .4, .4) | 113 | draw_box(context, a/10000, y, b/10000, bar_height, .6, .4, .4) |
| 114 | @@ -222,7 +245,7 @@ elif sys.argv[1] == 'plot': | ||
| 115 | draw_text(context, 0, height-border*2, "Legend: Red = Activating; Pink = Active; Dark Pink = Deactivating", hcenter = 0, vcenter = -1) | ||
| 116 | |||
| 117 | if initrd_time > 0: | ||
| 118 | - draw_text(context, 0, height-border*2 + bar_height, "Startup finished in %lums (kernel) + %lums (initrd) + %lums (userspace) = %lums" % ( \ | ||
| 119 | + draw_text(context, 0, height-border*2 + bar_height, "Startup finished in %lums (kernel) + %lums (initramfs) + %lums (userspace) = %lums" % ( \ | ||
| 120 | initrd_time/1000, \ | ||
| 121 | (start_time - initrd_time)/1000, \ | ||
| 122 | (finish_time - start_time)/1000, \ | ||
| 93 | -- | 123 | -- |
| 94 | 1.6.6.1 | 124 | 1.6.6.1 |
| 95 | 125 | ||
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb index b895f0d989..b796411ea5 100644 --- a/meta-oe/recipes-core/systemd/systemd_git.bb +++ b/meta-oe/recipes-core/systemd/systemd_git.bb | |||
| @@ -14,7 +14,7 @@ inherit gitpkgv | |||
| 14 | PKGV = "v${GITPKGVTAG}" | 14 | PKGV = "v${GITPKGVTAG}" |
| 15 | 15 | ||
| 16 | PV = "git" | 16 | PV = "git" |
| 17 | PR = "r0" | 17 | PR = "r1" |
| 18 | 18 | ||
| 19 | inherit autotools vala perlnative | 19 | inherit autotools vala perlnative |
| 20 | 20 | ||
