[LLVMdev] not much performance gain when reuse the JIT cached compiled object in the subsequent call to the same function ....
Cheng Zhu
chengzhu at gmail.com
Thu Sep 25 18:29:06 PDT 2014
Hi, All
I am using MCJIT to compile a expression function and save the JIT compiled
object into a ObjectCache using std::map<std::string
functionName, llvm::MemoryBuffer> and then it could be reused in the
subsequent call to that expression function. However I don't get much
performance gain vs. still compile the same function in each call and not
to save the compiled object into ObjectCache. One interesting observation
in the perf top is that there are many usage on functions under
llvm::DenseMapBase. libptcompiler.so is the library contains a llvm helper
class and it has the ObjectCache in it. Does the usage make sense to you
guys and any suggestion? Thank you.
1.72% libptcompiler.so [.] bool
llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >, void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >::LookupBucketFor<void const
1.45% libptcompiler.so [.] llvm::sys::MemoryFence()
1.20% libptcompiler.so [.] llvm::DenseMapInfo<void
const*>::isEqual(void const*, void const*)
1.02% libptcompiler.so [.] bool
llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::PassInfo const*,
llvm::DenseMapInfo<void const*> >, void const*, llvm::PassInfo const*,
llvm::DenseMapInfo<void const*> >::Lookup
0.95% libptcompiler.so [.]
llvm::DenseMapInfo<unsigned int>::isEqual(unsigned int const&, unsigned int
const&)
0.94% libptcompiler.so [.] llvm::DenseMap<void
const*, llvm::Pass*, llvm::DenseMapInfo<void const*> >::getBuckets() const
0.93% libptcompiler.so [.]
llvm::PMTopLevelManager::findAnalysisPass(void const*)
0.81% libptcompiler.so [.]
llvm::DenseMapIterator<void const*, llvm::Pass*, llvm::DenseMapInfo<void
const*>, true>::DenseMapIterator(llvm::DenseMapIterator<void const*,
llvm::Pass*, llvm::DenseMapInfo<void const*>,
0.76% libptcompiler.so [.] llvm::DenseMap<void
const*, llvm::Pass*, llvm::DenseMapInfo<void const*> >::getNumBuckets()
const
0.75% libptcompiler.so [.]
llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >, void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >::getBucketsEnd()
0.73% libptcompiler.so [.]
llvm::DenseMapIterator<llvm::Pass*, llvm::Pass*,
llvm::DenseMapInfo<llvm::Pass*>, false>::AdvancePastEmptyBuckets()
0.72% libptcompiler.so [.] bool
llvm::DenseMapBase<llvm::DenseMap<unsigned int, std::pair<unsigned int,
unsigned int>, llvm::DenseMapInfo<unsigned int> >, unsigned int,
std::pair<unsigned int, unsigned int>, llvm::
0.69% libpthread-2.12.so [.] pthread_rwlock_rdlock
0.65% libc-2.12.so [.] _int_malloc
0.61% libpthread-2.12.so [.] pthread_rwlock_unlock
0.61% perf [.] 0x000000000005f1dd
0.60% libptcompiler.so [.]
llvm::DenseMapInfo<llvm::Pass*>::isEqual(llvm::Pass const*, llvm::Pass
const*)
0.57% libptcompiler.so [.]
llvm::DenseMapIterator<void const*, llvm::PassInfo const*,
llvm::DenseMapInfo<void const*>,
true>::DenseMapIterator(llvm::DenseMapIterator<void const*, llvm::PassInfo
const*, llvm::DenseM
0.55% libptcompiler.so [.]
llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >, void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >::getBuckets()
0.50% libc-2.12.so [.] malloc
0.50% libptcompiler.so [.]
llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >, void const*, llvm::Pass*,
llvm::DenseMapInfo<void const*> >::getNumBuckets() const
0.49% libptcompiler.so [.]
llvm::DenseMapIterator<void const*, llvm::Pass*, llvm::DenseMapInfo<void
const*>, false>::DenseMapIterator(std::pair<void const*, llvm::Pass*>*,
std::pair<void const*, llvm::Pass*>*, bool
Press '?' for help on key bindings
--
Best regards
Cheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140925/5d2944ab/attachment.html>
More information about the llvm-dev
mailing list