Bug 265368

Summary: [New Port] benchmarks/uica: uops.info Code Analyzer
Product: Ports & Packages Reporter: Robert Clausecker <fuz>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi, python
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
[New Port] benchmarks/uica: uops.info Code Analyzer fuz: maintainer-approval+

Description Robert Clausecker freebsd_committer freebsd_triage 2022-07-21 22:10:46 UTC
Created attachment 235413 [details]
[New Port] benchmarks/uica: uops.info Code Analyzer

uiCA is a simulator that can predict the throughput of basic blocks on
recent Intel microarchitectures. In addition to that, it also provides
insights into how the code is executed.

uiCA is based on data from uops.info, combined with a detailed pipeline
model. Like related tools, it assumes that all memory accesses result in
cache hits.

WWW: https://uops.info/uiCA.html

Tested with Poudriere on armv7 arm64 i386 amd64 FreeBSD 13.1.
Portclippy likes the port.
Portlint has two issues:

 - it doesn't like the PORTVERSION, I think that's a bug (cf. bug #265364)
 - it doesn't like COMMENT= uops.info Code Analyzer

For the latter, the comment could be changed if needed, but as is, it's pretty much exactly what the software is.  uops.info is a domain name and should be rendered in lower case letters.  Perhaps an exception to the guidelines can be made here.

On another note, this port is a Python port and doesn't come with distutils or the like.  I have tried to get the packaging right, but alas I'm not a Python expert and may have made some sort of terrible mistake.  Please may someone with more experience check this one.

The special treatment of the xml distfile is due to upstream naming the most recent version "instructions.xml".  When a new version comes out, the current version is moved to a dated file name.  I try to work around this by trying both, banking on distinfo to reject the undated file if it has changed.
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2022-08-01 11:04:30 UTC
testbuilds@work
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2022-08-01 11:55:20 UTC
(In reply to Robert Clausecker from comment #0)

Would 'COMMENT= MicroCode Ops Analyzer uops.info' be OK ?
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2022-08-01 11:55:31 UTC
(In reply to Kurt Jaeger from comment #1)
testbuilds are fine
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2022-08-01 14:38:14 UTC
(In reply to Kurt Jaeger from comment #2)

It would be possible, but it would make the port harder to find as it's using different wording.  My preferred COMMENT if the one I give is not permitted would be

    COMMENT= Code Analyzer from the uops.info project

It's really awkward to phrase it such that uops.info is not in the front.
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2022-08-01 20:29:24 UTC
Committed, thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-08-01 20:29:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fc3a761d2cfc293c26264d2fc126914943e2e839

commit fc3a761d2cfc293c26264d2fc126914943e2e839
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-08-01 20:26:50 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2022-08-01 20:28:49 +0000

    benchmarks/uica: New port: uops.info Code Analyzer

    uiCA is a simulator that can predict the throughput of basic blocks on
    recent Intel microarchitectures. In addition to that, it also provides
    insights into how the code is executed.

    uiCA is based on data from uops.info, combined with a detailed pipeline
    model. Like related tools, it assumes that all memory accesses result in
    cache hits.

    WWW: https://uops.info/uiCA.html

    Author:    Robert Clausecker <fuz@fuz.su>
    PR: 265368

 benchmarks/Makefile                                |  1 +
 benchmarks/uica/Makefile (new)                     | 60 ++++++++++++++++++++++
 benchmarks/uica/distinfo (new)                     |  9 ++++
 .../uica/files/patch-mbuild_mbuild_env.py (new)    | 11 ++++
 benchmarks/uica/files/patch-uiCA.py (new)          | 11 ++++
 benchmarks/uica/pkg-descr (new)                    |  9 ++++
 benchmarks/uica/pkg-plist (new)                    | 36 +++++++++++++
 7 files changed, 137 insertions(+)
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2022-08-01 20:35:37 UTC
Much appreciated, thanks!