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

mass: return memory report to arvo #675

Merged
merged 11 commits into from
Aug 15, 2024
Merged

mass: return memory report to arvo #675

merged 11 commits into from
Aug 15, 2024

Conversation

tinnus-napbus
Copy link
Contributor

@tinnus-napbus tinnus-napbus commented Jul 11, 2024

Dill can give Vere a [%quac ~] gift and vere returns a memory report in a [%quac p=(list quac)] where a quac is a [name=@t size=@ud quacs=(list quac)] nested memory report structure. Vere itself does not print the memory report in this case, but it still does when requested with the old |mass/%heft and grab from the command-line. Arvo will implement its own memory report printer for quacs.

Unlike the previous version that used a fake driver to inject the report, this does it properly through Dill's driver, using a %quiz plea/writ to query the serf for this info.

@tinnus-napbus tinnus-napbus requested a review from pkova July 11, 2024 14:54
@tinnus-napbus tinnus-napbus requested a review from a team as a code owner July 11, 2024 14:54
@jalehman jalehman requested review from joemfb and matthew-levan July 11, 2024 22:06
pkg/noun/manage.h Outdated Show resolved Hide resolved
pkg/noun/jets.c Outdated Show resolved Hide resolved
pkg/noun/jets.c Outdated Show resolved Hide resolved
pkg/noun/manage.c Outdated Show resolved Hide resolved
pkg/vere/io/term.c Outdated Show resolved Hide resolved
pkg/vere/lord.c Outdated Show resolved Hide resolved
pkg/vere/main.c Outdated
@@ -3111,6 +3111,7 @@ main(c3_i argc,
// validate whether we can execute disk migration
if ( u3_Host.ops_u.nuu == c3n ) {
_cw_play_impl(0, 0, c3n, c3n, c3n);
signal(SIGTSTP, _stop_exit);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this an unintentional addition from a merge commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pkova do you know where this came from? Should I remove this or is it from that thingy you merged in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think maybe I accidentally squashed in something you merged. If it just manually remove the extra changes will it screw things up if you subsequently merge that thing into develop or wherever?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine to remove from this PR, it corresponds to this stuff that's already on develop:

vere/pkg/vere/main.c

Lines 3316 to 3325 in 58aa31c

// validate whether we can execute disk migration
if ( u3_Host.ops_u.nuu == c3n ) {
c3_i sat_i = _cw_play_fork(0, 0, c3n, c3n, c3n);
if ( sat_i ) {
fprintf(stderr, "play: replay failed\r\n");
exit(sat_i);
}
signal(SIGTSTP, _stop_exit);
// XX unmap loom, else parts of the snapshot could be left in memory
}

pkg/vere/serf.c Outdated
/* _serf_quac: convert a quac to a noun.
*/
u3_noun
_serf_quac(quac* mas_u)
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps you could condense _serf_quac and _serf_quacs to a single function that returns just a quac noun or a (list quac) depending on the len_w parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm wary of a function that returns two different hoon types depending on its arg. Do you think that's ok?

Posting a bit of cleanup here rather than just submitting comments on
the PR.
pkg/noun/allocate.c Outdated Show resolved Hide resolved
- init len_w in quac, use null term'd list instead
- add spaces between arithmetic operators
- publicise _lord_writ_new() as u3_lord_writ_new()
- rename lord_writ_plan as u3_lord_writ_plan
- remove superfluous printfs
- misc tidying
@pkova pkova changed the base branch from develop to next/kelvin/410 August 13, 2024 10:46
@pkova pkova force-pushed the tinnus-mass branch 2 times, most recently from 3a32a21 to 4fa4d72 Compare August 13, 2024 15:56
@pkova pkova merged commit db15130 into next/kelvin/410 Aug 15, 2024
5 checks passed
@pkova pkova deleted the tinnus-mass branch August 15, 2024 10:56
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.

4 participants