OSDN Git Service

Optimized instrumentation listener handling
authorDaniel Mihalyi <daniel.mihalyi@mattakis.com>
Mon, 18 Aug 2014 16:45:31 +0000 (18:45 +0200)
committerIan Rogers <irogers@google.com>
Mon, 18 Aug 2014 18:13:28 +0000 (11:13 -0700)
commitca1d06cfa2f2b8d2be4390644e126cb68cdbb5ba
treee5e7d0caffc2538e2cc005705410c0496628d741
parent90b180ee1edd17b8dca34ea9e58624818d2ee15a
Optimized instrumentation listener handling

Some instrumentation listener lists may be modified while iterating
over the list to deliver an instrumentation event. Therefore the
previous implementation copied the list of listeners before starting
the iteration.

This new implementation only copies the list of instrumentation
listeners when the list is changed. Instances of the list are
reference counted using std::shared_ptr<>.

Change-Id: I1b84db1f2042836dc1110925243f49e5790156d6
runtime/instrumentation.cc
runtime/instrumentation.h