Skip to content
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

Remove symbolize::Builder::enable_debug_syms()? #349

Closed
danielocfb opened this issue Oct 3, 2023 · 1 comment
Closed

Remove symbolize::Builder::enable_debug_syms()? #349

danielocfb opened this issue Oct 3, 2023 · 1 comment
Assignees

Comments

@danielocfb
Copy link
Collaborator

https://docs.rs/blazesym/0.2.0-alpha.6/blazesym/symbolize/struct.Builder.html#method.enable_debug_syms

This entire property seems rather...useless. In the current design "debug_syms" are only available for ELF (if present). We should probably move it into the Elf source object instead. But also we had some thoughts on decoupling ELF & DWARF and making the latter a first class thing, which may make more sense for split DWARF cases.

@danielocfb
Copy link
Collaborator Author

Interestingly we already do that for the inspect set of APIs, where the fact that we consult debug information is encoded in the source: https://docs.rs/blazesym/0.2.0-alpha.7/blazesym/inspect/struct.Elf.html

@d-e-s-o d-e-s-o self-assigned this Nov 23, 2023
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 28, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 28, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 28, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 28, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 28, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 28, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 28, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 29, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 29, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Nov 29, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb pushed a commit to danielocfb/blazesym that referenced this issue Dec 4, 2023
The Symbolizer currently treats the debug_syms setting as immutable: it
is set once for the instance and cannot be changed. The Inspector, on
the other hand, has it be a per-request attribute.
The latter is obviously more flexible, as the format can trivially be
expressed with it. Conceptually, it does not make sense to have this
setting apply to the Symbolizer instance and, hence, to all sources.
That is because there simply is no concept of debug symbols for anything
but ELF (which happens to be able to contain DWARF).
To make this explicit, move this setting to the individual sources that
it does affect. That is quite a bit more verbose, but it is the better
and more flexible design. If it becomes a problem moving forward, we
could consider introducing a `DwarfOpts` setting or similar.
Note that the "code info" setting is somewhat similar, but different
enough to have a different reasoning applied: it is a mere property of
the format whether it contains line and source code information, but
conceptually each symbolization source could support it. As such, having
it be a property of the Symbolizer makes a bit more sense. It's still
limiting in the sense that it can't be flipped between requests, and so
ultimately we may move it into the source representations as well, but
for now we don't go down that route.

Closes: libbpf#349

Signed-off-by: Daniel Müller <deso@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants