Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Conversation

@sergiud
Copy link
Contributor

@sergiud sergiud commented Jan 18, 2017

In case there's thread-local storage (TLS) support, logging doesn't need to allocate memory for every message making it more memory efficient.

@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@sergiud sergiud changed the title [RFC] reduce heapy memory allocations to zero [RFC] reduce heap memory allocations to zero Jan 18, 2017
@sergiud sergiud force-pushed the zero-allocation branch 2 times, most recently from 05e83e5 to 73203be Compare January 18, 2017 09:32
@googlebot
Copy link
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@hansres
Copy link
Contributor

hansres commented Jan 18, 2017

I confirm being okay with my commits being contributed to this project.

@sergiud
Copy link
Contributor Author

sergiud commented Feb 22, 2017

@ukai Could you please take a look at this PR?

Copy link
Contributor

@shinh shinh left a comment

Choose a reason for hiding this comment

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

I put a comment but otherwise LGTM. I think this is a great idea. It'd be also great if ./configure supports this, too, but I don't think we need it in this PR. Thanks!

thread_data_available = false;
data_ = new (&thread_msg_data) LogMessageData();
} else {
allocated_ = new LogMessageData();
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add a test case for this code path. Just

LOG(INFO) << LOG(INFO) << "nested LOG";

should be fine.

@sergiud sergiud force-pushed the zero-allocation branch from 73203be to dbde375 Compare July 5, 2017 21:24
@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@sergiud sergiud force-pushed the zero-allocation branch from dbde375 to ec8d8c2 Compare July 5, 2017 21:28
@googlebot
Copy link
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@sergiud
Copy link
Contributor Author

sergiud commented Jul 5, 2017

@shinh Done. Please review.

@sergiud sergiud force-pushed the zero-allocation branch from ec8d8c2 to 2df0ca3 Compare July 5, 2017 22:02
@shinh shinh removed the cla: no label Jul 6, 2017
@shinh shinh merged commit a835da8 into google:master Jul 6, 2017
durswd pushed a commit to durswd/glog that referenced this pull request Sep 2, 2019
[RFC] reduce heap memory allocations to zero
@sergiud sergiud deleted the zero-allocation branch April 12, 2021 12:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants