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

Llvm36: Code fix and perf improvement #1193

Merged
merged 6 commits into from Aug 26, 2015
Merged

Llvm36: Code fix and perf improvement #1193

merged 6 commits into from Aug 26, 2015

Conversation

vlj
Copy link
Contributor

@vlj vlj commented Aug 23, 2015

This PR makes some a little clearer and also make it more efficient by avoiding uneeded indirection and by adding a big table.

@vlj
Copy link
Contributor Author

vlj commented Aug 24, 2015

Fixed an issue with address not being divised by 4 where it should, spotted by flashmozz

@@ -289,12 +289,20 @@ RecompilationEngine::RecompilationEngine()
, m_currentId(0)
, m_last_cache_clear_time(std::chrono::high_resolution_clock::now())
, m_compiler(*this, CPUHybridDecoderRecompiler::ExecuteFunction, CPUHybridDecoderRecompiler::ExecuteTillReturn, CPUHybridDecoderRecompiler::PollStatus) {

// PS3 has 256 Mb of memory.
Copy link
Member

Choose a reason for hiding this comment

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

Totally unrelated. Yes, PS3 has something about 256+256 MB of physical memory. But we don't emulate physical memory, we emulate virtual memory which overall range is assumed to be 4 GB.

Here is 512 MB of the host memory allocated, which is quite a big amount, since most of it will be unused anyway. It approximately doubles rpcs3 memory consumption.

@vlj vlj force-pushed the llvm36 branch 5 times, most recently from 61f903c to 211235d Compare August 26, 2015 16:40
@vlj
Copy link
Contributor Author

vlj commented Aug 26, 2015

Rebased + I use virtualAlloc/mmap to allocate the table. I factored the calls in 3 functions in vm namespace.

@Nekotekina
Copy link
Member

No, not in vm namespace. Not a good idea.

@vlj
Copy link
Contributor Author

vlj commented Aug 26, 2015

Moved to Utilities

@vlj vlj force-pushed the llvm36 branch 3 times, most recently from 0b125d0 to 610d68a Compare August 26, 2015 18:46
@vlj
Copy link
Contributor Author

vlj commented Aug 26, 2015

Use a namespace, and tweaked reservation size + added some comments/define

@vlj vlj force-pushed the llvm36 branch 2 times, most recently from 82ecce4 to 0ca907d Compare August 26, 2015 20:18
…ion result.

The hashmap overhead may be really big in some case.
@vlj
Copy link
Contributor Author

vlj commented Aug 26, 2015

Fixed typo and added comments

@danilaml
Copy link
Contributor

LGTM

@Nekotekina Nekotekina merged commit 5fe3ea6 into RPCS3:master Aug 26, 2015
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.

None yet

3 participants