OSDN Git Service

Optimized instrumentation listener handling
authorDaniel Mihalyi <daniel.mihalyi@mattakis.com>
Mon, 18 Aug 2014 16:45:31 +0000 (18:45 +0200)
committerSebastien Hertz <shertz@google.com>
Fri, 22 Aug 2014 05:34:30 +0000 (07:34 +0200)
commit96add97815ba8418fb4e8c0fc08dbf9c7198f244
treefbbed5ec71b33a6f9937bfb61dce0a63849053e1
parent39c2a379795460374b41e627257130e3c4ab961f
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<>.

Bug: 16814665

(cherry picked from commit ca1d06cfa2f2b8d2be4390644e126cb68cdbb5ba)

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