Skip to content

Conversation

davmason
Copy link
Contributor

@davmason davmason commented Jun 13, 2020

Fixes #1068

Corresponding runtime changes in dotnet/runtime#37853. I have an editor extension that removes trailing whitespace, sorry for the large amount of whitespace changes. I was not aware how much trailing whitespace there was in the SOS sources.

Copy link
Contributor

@mikem8361 mikem8361 left a comment

Choose a reason for hiding this comment

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

Maybe someone from @Maoni0 group to look at this too.

@davmason
Copy link
Contributor Author

@mikem8361 how do I debug a single test on linux/mac? The GCTests SOS test is failing but only on non-windows.

@mikem8361
Copy link
Contributor

mikem8361 commented Jun 16, 2020 via email

class GCHeapDetails
{
private:
void GetGenerationTableSize(CLRDATA_ADDRESS svrHeapAddr, unsigned int *count)
Copy link
Member

Choose a reason for hiding this comment

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

GetGenerationTableSize [](start = 9, length = 22)

nit - what was the reason to call this GetGenerationTableSize instead of GetNumberGenerations 'cause it seems like that's exactly what it does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a helper method in GCHeapDetails and not a public API, and the only place it's called is to get the size to allocate for the generation table. It could be named either way

Copy link
Member

@Maoni0 Maoni0 left a comment

Choose a reason for hiding this comment

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

:shipit:

//
//
//
Copy link
Contributor

Choose a reason for hiding this comment

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

These whitespace only changes make it very difficult to review this change. Is there any way you could separate just the code changes into one PR and the whitespace only fixes into another? Or are they sufficiently merged together at this point? Chrome is having a real tough time rendering these large diffs.

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 tried for about a half hour today to undo the whitespace changes and can't without manually redoing everything. There apparently are lots of ways to remove trailing whitespace with git commands, but no way to preserve it I could find.

If you don't know - recently github added ignore whitespace to reviews, but it's kind of hidden. The settings button (gear icon at the top) should have a checkbox to ignore whitespace.

Sorry about the noise

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

The SOS changes looked good to me! Are there some updated tests as well?

@davmason
Copy link
Contributor Author

The SOS changes looked good to me! Are there some updated tests as well?

I have been manually testing and want to add an automated test but it's taking a little bit longer than expected

@davmason
Copy link
Contributor Author

@mikem8361 How do I coordinate adding a test for this? The SOS tests run against the preview bits so it won't pass until my runtime changes make it in to the preview builds

@mikem8361
Copy link
Contributor

You can develop the SOS tests in the diagnostics repo and use the test.cmd -privatebuildpath or test.sh -privatebuildpath (see details here). You should run test.cmd/sh first without the option to install all test runtimes (there is a bug in the scripts that requires it).

Once you get the tests running, merge the runtime changes and wait up DARC pushes the new version to the diagnostics repo (one or days normally). Once your runtime version makes it into the diagnostics repo, you merge the new tests.

I'd find some existing test script to add the new commands/reqex matching to like OtherCommands.script. It can be a real pain to get the regex right. Hopefully the existing script regexs will help.

@davmason
Copy link
Contributor Author

I am opening #1264 to add the test for this so I don't have to block merging this change. I have confirmed it passes with a private build.

@davmason davmason merged commit 2f9f4ba into dotnet:master Jun 18, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SOS does not know about the pinned object heap
5 participants