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

debug-info-defconfig: add debug symbols needed by pahole #98

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

plbossart
Copy link
Member

@plbossart plbossart commented Jun 21, 2024

With this we can see the structures

pahole -C 'snd_sof_dev' sound/soc/sof/snd-sof.o
struct snd_sof_dev {
	struct device *            dev;                  /*     0     8 */
	spinlock_t                 ipc_lock;             /*     8    72 */
	/* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */
	spinlock_t                 hw_lock;              /*    80    72 */
	/* --- cacheline 2 boundary (128 bytes) was 24 bytes ago --- */
	bool                       dspless_mode_selected; /*   152     1 */

	/* XXX 7 bytes hole, try to pack */

	struct sof_firmware        basefw;               /*   160    16 */

	/* XXX last struct has 4 bytes of padding */

	struct snd_soc_component_driver plat_drv;        /*   176   384 */
...

With this we can see the structures

pahole -C 'snd_sof_dev' sound/soc/sof/snd-sof.o
struct snd_sof_dev {
	struct device *            dev;                  /*     0     8 */
	spinlock_t                 ipc_lock;             /*     8    72 */
	/* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */
	spinlock_t                 hw_lock;              /*    80    72 */
	/* --- cacheline 2 boundary (128 bytes) was 24 bytes ago --- */
	bool                       dspless_mode_selected; /*   152     1 */

	/* XXX 7 bytes hole, try to pack */

	struct sof_firmware        basefw;               /*   160    16 */

	/* XXX last struct has 4 bytes of padding */

	struct snd_soc_component_driver plat_drv;        /*   176   384 */
...

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
Copy link
Member Author

Merge delayed until the Jenkins and CI build servers add 'pahole' as a dependency @fredoh9 @ssavati @marc-hb

@fredoh9
Copy link

fredoh9 commented Jun 27, 2024

kernel builders have pahole package now.
Let me test build once before merging this.

Copy link

@fredoh9 fredoh9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal Linux build index 2114 is the one.

Other than checking on output config file, I was able to see pahole ouput.

Without this PR.

(build output directory) $ pahole -C 'snd_sof_dev' sound/soc/sof/snd-sof.o
libbpf: failed to find '.BTF' ELF section in sound/soc/sof/snd-sof.o
pahole: sound/soc/sof/snd-sof.o: Invalid argument

pahole output is interesting to compare with source structures.

@fredoh9 fredoh9 merged commit c68d8d6 into thesofproject:master Jun 27, 2024
4 checks passed
@fredoh9
Copy link

fredoh9 commented Jun 27, 2024

After merged, I found a interesting change.
There is extra -dbg package is generated. 220MB vs 26MB.
It is not a problem, but I will double check which package will be chosen by the deploy script.

linux-image-6.10.0-rc4-g7f5c1e85f4fe-dbg_6.10.0-rc4-default-topic-sof-dev_amd64.deb	2024-06-27 17:36	220M	 
linux-image-6.10.0-rc4-g7f5c1e85f4fe_6.10.0-rc4-default-topic-sof-dev_amd64.deb	2024-06-27 17:29	26M

@fredoh9
Copy link

fredoh9 commented Jun 27, 2024

deploy script chooses -dbg package. It's first hit by name order

@fredoh9
Copy link

fredoh9 commented Jun 27, 2024

Sorry, it is a critical problem. looks '-dbg' package is NOT the kernel package, looks only with debug information? It didn't create booting entry. Non debug package has to be installed to boot.

I need to revert this PR. Sorry about too early merge.

internal jenkins log for deploy test,
job/testflow_new/37420/console

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

Successfully merging this pull request may close these issues.

2 participants