Hi,

I checked the latest code and I see 2 issues that can cause a crash.
Both related to DBus signaler.
1. You have to protect queue with mutex,
because timer may be called from different thread than thread in which you are inserting into queue.
2. AbstractType::setValue does delete mValue and set the new pointer. From dbus signaler you are accessing mValue. I can reproduce crash in < 50ms when changing property every 1 ms.

I did some performance improvement, but I haven't been able to compare because of the crash of the original code :-)

Marek

On Jun 11, 2014 9:41 PM, "Marek Timko" <marek.timko1@gmail.com> wrote:

Just came to my mind: I have a very good experience with Intel VTune  ;-)
It was on Windows, but it's available also for Linux.

https://software.intel.com/en-us/intel-vtune-amplifier-xe

It's able to to show CPU usage per function.

Marek

On Tue, Jun 10, 2014 at 12:47 AM, marek.timko1@gmail.com
<marek.timko1@gmail.com> wrote:
>
> Hi Kevron,
> I see that there is still 8-9% CPU usage in performance
> test(https://bugs.tizen.org/jira/browse/TIVI-2623).

I haven't pushed some of the more impactful changes to tizen yet.  So
the most recent test doesn't include those (0.11.809 vs 810).

> I suggest to use valgrind with callgrind plugin(--tool=callgrind).
> QtCreator has a nice support plugin for valgrind.
> You can find tho most often called methods(and time consumption) and
> improove the most critical then.
>

Agreed.  I do use that tool in QtCreator.  It's very nice.  There's a
lot of data to sift through.  So far I've only been addressing the
biggest pigs I can find, which are typically related to DBus usage.
But as that becomes less of an issue, I'll have to use the tools to
find smaller "pigs".

> And I still think that you should replace all method calls with arguments
> passed by value with arguments passed by (const) reference. At least those
> under lib folder - it affect all plugins and can be called very often.
> For example AbstractRoutingEngine::setProperty(AsyncSetPropertyRequest
> request) is called for every signal change, If I remember correctly.
> It also should reduce CPU usage. ( Imagine std::string -> there is always at
> least one malloc, one memcopy and one free call for each method call with
> arguments passed by value for each std::string argument).
>

Agreed.  Passing by const ref makes sense.

> Marek.
>
> Sent from my mobile
>
> _______________________________________________
> AMB mailing list
> AMB@lists.01.org
> https://lists.01.org/mailman/listinfo/amb
>