You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the pprof tooling can provide more information to help debug certain memory leak issues. Here is a (simplified) pseudo code to explain what additional information I'm looking for -
type Foo struct {
c Cache
}
type Bar struct {
c Cache
}
s1 Foo
s2 Bar
type (c *Cache) Populate { -----> results in memory leak for s1 but not s2
}
Go tool proof (invoked with either inuse_space or inuse_objects would show that memory usage is increasing in the type (c *Cache) Populate, but it would be helpful if the tooling could attribute the memory usage to the different instances - s1 vs s2? While you can argue different design based the pseudo code, the feature request is relevant more generally.
Edit : I think this falls under the "feature request" category, but I'm unable to update the labels.
The text was updated successfully, but these errors were encountered:
The tooling does not really work that way. It is attributing allocations to functions that call the allocation routines. It has no idea where that memory goes or what it is held by. I don't see a way to do what you are asking for. A heap dump would show information like that, but we don't have particularly great support for that at the moment.
I believe the pprof tooling can provide more information to help debug certain memory leak issues. Here is a (simplified) pseudo code to explain what additional information I'm looking for -
Go tool proof (invoked with either
inuse_space
orinuse_objects
would show that memory usage is increasing in the type(c *Cache) Populate
, but it would be helpful if the tooling could attribute the memory usage to the different instances -s1
vss2
? While you can argue different design based the pseudo code, the feature request is relevant more generally.Edit : I think this falls under the "feature request" category, but I'm unable to update the labels.
The text was updated successfully, but these errors were encountered: