Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Change the type profiling implementation #15

Open
jerrinsg opened this issue May 6, 2020 · 0 comments
Open

Change the type profiling implementation #15

jerrinsg opened this issue May 6, 2020 · 0 comments
Assignees

Comments

@jerrinsg
Copy link
Owner

jerrinsg commented May 6, 2020

Type profiling is used to keep track of how many times a datatype has been allocated. This is used to promote heavily allocated types to be specially cached in mcache so that future allocations would be fast. Currently a large static array of size 50,000 is used to track these stats. This is because the index of a type within a Go binary cannot be known at runtime currently, so an offset from a static location typeBase is used to determine type index.
But using a large static array is not a good idea. It increases the binary size and also could cause runtime issues. For example, when etcd was compiled with go-pmem certain type fields were seen to overshoot the index value of 50,000.

@jerrinsg jerrinsg self-assigned this May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant