Skip to content

obj: add footer ignoring for valgrind#27

Merged
janekmi merged 2 commits intomasterfrom
ignore_footer
Dec 16, 2025
Merged

obj: add footer ignoring for valgrind#27
janekmi merged 2 commits intomasterfrom
ignore_footer

Conversation

@osalyk
Copy link
Contributor

@osalyk osalyk commented Dec 11, 2025

Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
Copy link
Contributor

@janekmi janekmi left a comment

Choose a reason for hiding this comment

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

@janekmi reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @grom72 and @osalyk)


src/libpmemobj/memblock.c line 1185 at r1 (raw file):

	*(hdr + size_idx - 1) = f;
	/* no need to persist, footers are recreated in heap_populate_buckets */
	VALGRIND_SET_CLEAN(hdr + size_idx - 1, sizeof(f));

Do we still need this one?

Copy link
Contributor Author

@osalyk osalyk left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @grom72 and @janekmi)


src/libpmemobj/memblock.c line 1185 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

Do we still need this one?

Yes.
image.png

Copy link
Contributor

@grom72 grom72 left a comment

Choose a reason for hiding this comment

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

@grom72 reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @janekmi)

Copy link
Contributor

@grom72 grom72 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @janekmi)

Copy link
Contributor

@janekmi janekmi left a comment

Choose a reason for hiding this comment

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

@janekmi reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @osalyk)


src/libpmemobj/memblock.c line 1185 at r1 (raw file):

	*(hdr + size_idx - 1) = f;
	/* no need to persist, footers are recreated in heap_populate_buckets */
	VALGRIND_SET_CLEAN(hdr + size_idx - 1, sizeof(f));
  1. It would be better keep two "ignore" calls together and have a common description for both of them. But I have a suspicion the TX-related call has to be done before the memory is modified, hasn't it? 😉
  2. The comment you proposed sounds a lot more sophisticated but I could not find the source of the terms you used and I do not want to introduce new terms like "persistent storage" or "transactional storage". It is very important to use one vocabulary across the codebase. The comment I propose below is a simple extension of the comment which was already here. But I am happy to discuss it further.

Suggestion:

	*(hdr + size_idx - 1) = f;
	/*
	 * no need to add to a transaction nor persist, footers are recreated in
	 * heap_populate_buckets
	 */
	VALGRIND_ADD_TO_GLOBAL_TX_IGNORE(hdr + size_idx - 1, sizeof(f));
	VALGRIND_SET_CLEAN(hdr + size_idx - 1, sizeof(f));

Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
Copy link
Contributor Author

@osalyk osalyk left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @grom72 and @janekmi)


src/libpmemobj/memblock.c line 1185 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…
  1. It would be better keep two "ignore" calls together and have a common description for both of them. But I have a suspicion the TX-related call has to be done before the memory is modified, hasn't it? 😉
  2. The comment you proposed sounds a lot more sophisticated but I could not find the source of the terms you used and I do not want to introduce new terms like "persistent storage" or "transactional storage". It is very important to use one vocabulary across the codebase. The comment I propose below is a simple extension of the comment which was already here. But I am happy to discuss it further.

Done.

Copy link
Contributor

@janekmi janekmi left a comment

Choose a reason for hiding this comment

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

:lgtm:

@janekmi reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @osalyk)

@janekmi janekmi merged commit 8a433e9 into master Dec 16, 2025
9 checks passed
osalyk added a commit that referenced this pull request Jan 14, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 14, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 14, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 14, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 16, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 16, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 16, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 16, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
osalyk added a commit that referenced this pull request Jan 16, 2026
Signed-off-by: Oksana Salyk <oksana.salyk@hpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants