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

Fixes memory leaks inside CoverageTool and improves style #324

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DanielELog
Copy link
Contributor

No description provided.

includes several style improvements
@DanielELog DanielELog force-pushed the CoverageToolFixes branch from bc8bb89 to 02dfbfa Compare May 27, 2024 21:15
- adds destructors for classes and respective calls for them
- provides a certain background for implementing test project collection in the future
@DanielELog DanielELog force-pushed the CoverageToolFixes branch from 02dfbfa to 4eb6f3b Compare May 27, 2024 21:36
@@ -31,6 +31,9 @@ CorProfiler::~CorProfiler()

HRESULT STDMETHODCALLTYPE CorProfiler::Initialize(IUnknown *pICorProfilerInfoUnk)
{
setbuf(stdout, NULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Не забыть удалить дебаг логи

Comment on lines +73 to +75
std::vector<std::vector<char>> serializedCoverage;
std::mutex collectedMethodsMutex;
std::vector<MethodInfo> collectedMethods;
Copy link
Contributor

Choose a reason for hiding this comment

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

private?

Comment on lines 88 to 89
return IsMain(moduleName, moduleSize, method) || (!profilerState->isTestExpected && !profilerState->collectMainOnly)
|| (profilerState->isTestExpected && doesContainAssembly(assemblyName, assemblySize, profilerState->approvedAssemblies));
Copy link
Contributor

Choose a reason for hiding this comment

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

Split into two variables

Comment on lines 16 to 25
bool IsEnvVarPresent(const char *name) {
auto value = std::getenv(name);
return value != nullptr && value[0] == '1';
}

char *CheckEnvVarAndGet(const char *name) {
auto str = std::getenv(name);
profiler_assert(str);
return str;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Странный нейминг

@DanielELog DanielELog requested a review from KarasssDev July 8, 2024 14:59
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