Opened 14 years ago
Closed 14 years ago
#6541 closed enhancement (fixed)
ActivityMonitor only using 4 colors on 8 CPUs.
Reported by: | jstressman | Owned by: | phoudoin |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/ActivityMonitor | Version: | R1/Development |
Keywords: | activitymonitor colors | Cc: | jstressman@… |
Blocked By: | Blocking: | ||
Platform: | All |
Description
I noticed this on a fresh install of hrev38478 but confirmed that it's been happening for many months (by looking at an old screenshot from 3/19/2010 and confirming it in that as well).
We discussed this on IRC a bit and the discussion seems to hold some other possibly interesting information as well from people much more knowledgeable than I.
(I've tried to trim out the extraneous chatter)
(11:08:03 AM) phoudoin: the fix will be in src/apps/activitymonitor/DataSource.cpp, line 878 (11:08:12 AM) phoudoin: only 4 colors are defined. (11:09:49 AM) largo: phoudoin: thanks. I'll try some mock-ups. how many colors do you think should be defined? (11:09:55 AM) largo: just 8 for now until after R1? (11:10:23 AM) phoudoin: MAX_CPU_COUNT (11:11:44 AM) phoudoin: B_MAX_CPU_COUNT is set to 8 for R1, yes (11:11:48 AM) OmniMancer: largo look here on line 880 http://dev.haiku-os.org/browser/haiku/trunk/src/apps/activitymonitor/DataSource.cpp (11:12:27 AM) OmniMancer: yes otherwise the struct that uses an embedded array of that size is no longer the same size and abi compatability breaks (11:12:49 AM) phoudoin: OmniMancer: I know that's an ABI issue indeed. (11:19:25 AM) idefix_xifedi: largo: it is strange that your screenshot shows the middle window with 4 cpu's, two of them having the same colour (11:19:39 AM) idefix_xifedi: they all should have gotten a different colour... (11:20:17 AM) OmniMancer: it probably begind picking colours for each column of labels (11:22:36 AM) idefix_xifedi: but if I understand the code in DataSource.cpp correctly, the colour is directly related to the CPU number (variable 'cpu') (11:23:49 AM) OmniMancer: oh yes that could still do it (11:24:08 AM) OmniMancer: it doesn't necessarily have cpu's from 0..number of cores you have (11:24:54 AM) idefix_xifedi: but then the text should't say CPU 0..number of cores (11:25:35 AM) idefix_xifedi: as I understand the code, the text "CPU 0" always implies a colour of 200,0,200 (11:26:34 AM) idefix_xifedi: but I have no way to test this, as I only have one signle core CPU in my computer (and a slow one at that)... (11:34:15 AM) phoudoin: I think that's a bug, idefix_xifedi. A CPUUsageDataSource (implicit CPU #0) is added, but as it report being PerCpu(), other are added by copy from 0 to # CPU. Should have been from 0 to # CPU *except* fro the first data source's CPU. (11:36:55 AM) phoudoin: which means we've two data source sharing the same data history *and* color. (11:41:53 AM) idefix_xifedi: not sure if I understood you correctly, but shouldn't the first CPUUsageDataSource not be CPU #0, but the average of all (8) CPU's? (11:42:40 AM) phoudoin: Not, that's the object of CombinedCPUUsageDataSource... (11:43:07 AM) idefix_xifedi: yeah sorry, just saw that one in the source code (11:48:17 AM) phoudoin: Could be related to the previous launch colors stored in settings: maybe "CPU 3 usage color" in 8 CPUs mode was cyan two (12:12:26 PM) largo: idefix_xifedi: I tested this on the latest nightly build a few hours ago. the problem with the colors is still there. (12:12:36 PM) largo: I only looked at the old screenshot to confirm whether or not it was a new issue. (12:13:52 PM) idefix_xifedi: and if you removed the settings file before launching? (12:18:28 PM) largo: idefix_xifedi: it was on a fresh install on a newly formatted partition. (12:19:05 PM) idefix_xifedi: then you should open a bug-report about that :) (12:19:38 PM) largo: will do.
While I had seen in those older shots only 3 colors used for 4 CPUs, I can't seem to replicate that behavior now, so that may very well have been fixed already.
But the 4 colors for 8 CPUs issue is definitely still there. (as only 4 colors are defined, they are reused for any # of CPU over 4)
Attachments (1)
Change History (3)
by , 14 years ago
Attachment: | activitymonitor-8cpu.png added |
---|
comment:1 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
shot of ActivityMonitor showing 4 colors being reused on 8 CPUs