Skip to content

Fix _LOGALLOC define - #106023

Merged
jkotas merged 1 commit into
dotnet:mainfrom
t-mustafin:fix_logalloc
Aug 6, 2024
Merged

jkotas merged 1 commit into
dotnet:mainfrom
t-mustafin:fix_logalloc

Conversation

@t-mustafin

@t-mustafin t-mustafin commented Aug 6, 2024 •

Copy link
Copy Markdown
Contributor

_LOGALLOC define was in gc.h while all usages in vm and this vm files do not include gc.h:

grep  src/coreclr/ -re LOGALLOC
src/coreclr/vm/gchelpers.cpp:#ifdef  _LOGALLOC
src/coreclr/vm/gchelpers.cpp:#ifdef  _LOGALLOC
src/coreclr/vm/gchelpers.cpp:#endif // _LOGALLOC
src/coreclr/vm/jitinterface.cpp:#ifdef _LOGALLOC
src/coreclr/vm/jitinterface.cpp:#endif // _LOGALLOC
src/coreclr/gc/gc.h:#define  _LOGALLOC

It caused lack of object allocation messages in common clr log.

@ghost ghost added the area-GC-coreclr label Aug 6, 2024
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 6, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

@t-mustafin

Copy link
Copy Markdown
Contributor Author

cc @dotnet/samsung

Comment thread src/coreclr/vm/object.h Outdated

struct RCW;

#ifdef _DEBUG

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

feels odd in object.h. Can it be added to log.h?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, done. Actually it just duplicates "_DEBUG" macro. Maybe it should be cleaned up and ifdef's should check "_DEBUG" macro instead?

@gbalykov gbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@t-mustafin
t-mustafin deleted the fix_logalloc branch August 7, 2024 09:15
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-GC-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants