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
No man page for xo_emit_field() #77
Comments
xo_emit_field() pointed out to me by @allanjude -- apparently it does exactly what I need for exactly this reason. Unfortunately, I failed to find it when spelunking. Can I suggest an Xref from the xo_emit(3) man page? |
Apparently this is, in fact, because it doesn't have a man page. Reopening as a bug report. :-) |
I should also comment that you should avoid underscores and upper case field names. Please review the guidelines at: https://libxo.readthedocs.io/en/latest/faq.html#what-makes-a-good-field-name I'm guessing these are real concrete register names, so perhaps these don't apply, or perhaps you should use a more flexible schema, like:
This gives you some benefits:
Thanks, |
They are names defined by the architecture spec itself, so we can't change those. I agree that they are not very desirable (for all the reasons you suggest). I did originally use the schedule you described, but it made things rather more messy to deal with in Python in our lab templates. This model removes a level of data-structure indirection, which does actually simplify things substantially. |
Fix is in 'develop' branch: https://raw.githubusercontent.com/Juniper/libxo/develop/libxo/xo_emit_field.3 Thanks, |
Fixed in libxo-1.5.0 |
libxo seems to have convenient APIs to allow various compile-time field names to be used. However, sometimes in life, I have a set of dynamically determined field names, and it wasn't clear to me that the API made that convenient. Possibly I've suffered a documentation spelunking fail, in which case please just point me in the right direction and close. But here is an example:Which outputs:
In this scenario, the A72 core we're using has dozens of performance counter events that can be configured, but due to an architectural limit, only 6 can be used at a time. The strings for those registers are already defined in other headers, and I definitely don't want to retype them or do anything to replicate that. Instead, I want to have the user pass the names via the command line, validate them using the PMC library, and then use them as field names with libxo.Pointers most welcome!The text was updated successfully, but these errors were encountered: