Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addpkg(x11/xfce4-cpugraph-plugin): 1.2.10 #20623

Merged
merged 5 commits into from
Aug 30, 2024

Conversation

knyipab
Copy link
Contributor

@knyipab knyipab commented Jun 21, 2024

On my phone with snapdragon 8 gen 2, core 0 and core 1 are usually not shown in top -H -b -q -o TID,%CPU,CPU -s 2 -n 1 for unknown reasons, it counts towards other cores. It's more of top issue not my code. Still it is useful to show the area graph.

@hansm629, please check and any feedback.

@hansm629
Copy link

@knyipab
Tested on Exynos 2400.

  • 3.2GHz Cortex-X4 1core
  • 2.9GHz Cortex-A720 2 core
  • 2.6GHz Cortex-A720 3 core
  • 1.96GHz Cortex-A520 4 core
  • L3 cache 8MB + SLC 8MB

ARM64 10 core specifications.

1

2

When rendering 4K@30fps HEVC video in Shotcut
All 10 core CPUs are being monitored!

Excellent!

@knyipab knyipab force-pushed the dev/xfce4-cpugraph-plugin branch 2 times, most recently from bc26e3d to 70afae4 Compare June 29, 2024 01:41
@knyipab
Copy link
Contributor Author

knyipab commented Jun 29, 2024

I rewrote to use thread stat aggregation instead of top. It should be more efficient and accurate.

I will probably write another patch for htop sometime later.

Again, couldn't use first two cores on my device (perhaps due to phone performance policy). @hansm629 see if you are interested in trying this version (perhaps along with the most recent #20393).

@hansm629
Copy link

@knyipab
Are you saying that 2 of the CPU cores cannot be monitored?

  • Galaxy Tab S9 Ultra (Snapdragon 8 Gen2 for Galaxy : 8 cores)
  • Galaxy S24+ (Exynos 2400 : 10 cores)
  • Galaxy S24 Ultra (Snapdragon 8 Gen3 for Galaxy : 8 cores)

All cores were monitored.

The screenshot below is from the Galaxy Tab S9 Ultra.
When rendering 4K video with Shotcut, all 8 cores are used.

Screenshot_2024-06-29_13-31-21
Screenshot_2024-06-29_13-31-21 (copy 1)

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't comment on the C++ but that seems well covered in the existing reviews.

x11-packages/xfce4-cpugraph-plugin/build.sh Outdated Show resolved Hide resolved
@knyipab
Copy link
Contributor Author

knyipab commented Jun 30, 2024

Thanks @licy183 and @tstein for reviewing! I made a commit to refactor. It's not yet squashed, for tracking changes.

To @licy183 after second thought, I abandon the idea of a "compatibility file" $PREFIX/var/proc/stat given the complexity (potentially need shared memory hash table to track thread cpu time and careful design upon termux crashes). I rather spare time for xfce4-battery-plugin, pipewire (and its subsequent applications) and Termux:X11 patches.

To @hansm629 thanks for testing. And yes, the 8 gen 2 in my Fold 5 never utilize first two cores in Termux, and not showing up in per-thread statistics in command top -H -O CPU. Probably it's some Samsung performance policy under DeX or what (??), though I already set Termux battery usage to unrestricted.

To @TomJo2000 I do not hold strong view and please advise:

  1. if the top implementation in the addpkg commmit should be kept or discarded
  2. whether TERMUX_PKG_REVISION=1 should be kept or dropped if there are addpkg and enhance commit

And then I will execute accordingly and squash commits (you may execute directly if you like) also for #20393 before merging. Thanks.

@twaik
Copy link
Member

twaik commented Jun 30, 2024

I rather spare time for ... and Termux:X11 patches.

And two PRs are waiting for rebasing :)

Probably it's some Samsung performance policy under DeX or what (??), though I already set Termux battery usage to unrestricted.

There already were problems with disabled kernels. They are being enabled on high demand, some kind of powersaving policy that you can not manage.

whether TERMUX_PKG_REVISION=1 should be kept or dropped if there are addpkg and enhance commit

TERMUX_PKG_REVISION should be increased on every Github Action run if there is no version bump. That is needed to make both apt and aptly consider it as a new package version.

@knyipab
Copy link
Contributor Author

knyipab commented Jun 30, 2024

And two PRs are waiting for rebasing :)

Yes, I actually meant sparing time to work on that two PRs (and that's perhaps after rewriting xfce4-battery-plugin with BatteryManager).

Side topic haha: debugging Termux:X11 requires boot my PC which generates a lot for heat in my room knowing that it's summer time now :) Nowadays I like to code in Termux in DeX and perhaps NDK toolchain is the only major prerequisite left before we can bring Android Studio to Termux. In this thread, I laid out the steps to setup Android Studio that can build SDK apps and encourage this author to bring NDK toolchain to Termux cuz I don't have that expertise: lzhiyong/termux-ndk#156.

TERMUX_PKG_REVISION should be increased on every Github Action run if there is no version bump. That is needed to make both apt and aptly consider it as a new package version.

Okay, if revision number is "per Github Action" not "per commit" then lemme drop that TERMUX_PKG_REVISION=1. (Edit: oh no... made a typo in commit message, nvm, that will be squashed)

@twaik
Copy link
Member

twaik commented Jun 30, 2024

encourage this author to bring NDK toolchain to Termux cuz I don't have that expertise: lzhiyong/termux-ndk#156.

What about using this? https://github.com/android-ide/aide_ndk/
UPD: sorry, I was wrong, it is 9 years old.

@knyipab
Copy link
Contributor Author

knyipab commented Jun 30, 2024

Seeing no reply (yet) from the author, I actually did (little) attempt to build. According to the project:

we don‘t need to rebuild the whole NDK, since google already built most of it. so we only need to build the llvm toolchain, then replace the llvm inside NDK.
Building the android-ndk, please refer to Android Clang/LLVM Toolchain Readme Doc

Not sure if I did anything wrong. The source download step already takes few tens of GB and fill up my storage drive :) so I gave up.

Android Studio on Termux is exciting. Perhaps if Termux devs find it interesting, may try.

@knyipab knyipab requested a review from TomJo2000 June 30, 2024 05:10
Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can evaluate it, this looks fine to me.

x11-packages/xfce4-cpugraph-plugin/build.sh Outdated Show resolved Hide resolved
@knyipab knyipab force-pushed the dev/xfce4-cpugraph-plugin branch from bb06be6 to 5f4c0dd Compare July 4, 2024 15:46
Copy link
Member

@licy183 licy183 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this PR tomorrow if there is no more review. Thanks!

@licy183 licy183 merged commit 5d1f392 into termux:master Aug 30, 2024
5 checks passed
nguynkhn pushed a commit to nguynkhn/termux-packages that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants