FAQ
G'day, All.

I've been asked to write an ABI revision compatibility tool for work and need to scan large executables, such as the freebsd kernel and libs.

I'd like to access the (d *Data) Type() from multiple threads, but as it is currently written it isn't thread safe, as it caches into the *Data. In addition, I'd like to know how many compile units are in the binary and to improve the performance of (*Reader) Seek() along the lines suggested in the code.

Proposals
1> Multithreaded Type system, use a Reader per thread and keep a type cache in it
- func (r *Reader) Type() (Type, error)
- func (r *Reader) MergeTypeCache() // User must provide a single threaded *Data context
2> Reimplement func (r *Reader) Seek(Offset) to use sort.Search rather than a linear search of compile units. Also fast path seeks in the current compile unit
3> Number of units in the executable
- func (d *Data) NumUnit() int
4> Add Lang constants for DW_TAG_compile_unit AT_language field.

Cheers

Godfrey

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 14, '13 at 11:23p
activeApr 14, '13 at 11:23p
posts1
users1
websitegolang.org

1 user in discussion

Godfrey van der Linden: 1 post

People

Translate

site design / logo © 2022 Grokbase