New MythTV add-on using libcmyth

  Thread Rating:
  • 8 Votes - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #31
tsp42 Wrote:The leak should be closed now.
Remarkable example of how well written the libcmyth code and documentation is :-)
Code:
/**
* Atomically decrement a reference count variable.
* \param valp address of atomic variable
* \return incremented reference count
*/
static inline unsigned
__mvp_atomic_decrement(mvp_atomic_t *valp)
{
    mvp_atomic_t __val;
#if defined __i486__ || defined __i586__ || defined __i686__
    __asm__ __volatile__(
        "lock xaddl %0, (%1);"
        "     inc   %0;"
        : "=r" (__val)


Thank you for your quick work on this!!

I am building a fresh clone.

I will feed back if i find anything new.

Thanks,

Dubstar_04

All Things PVR
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #32
Wow,

What an improvement!!!

It starts up in seconds and memory usage is about 50MB now instead of 1.5GB!!

One of the cpu cores is still pegged at 100% while xbmc is running, is there anyway of finding out what might cause it? maybe feedback to dushmaniac?

thanks again,

Dubstar_04

All Things PVR
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #33
dubstar_04 Wrote:Wow,

What an improvement!!!

It starts up in seconds and memory usage is about 50MB now instead of 1.5GB!!

One of the cpu cores is still pegged at 100% while xbmc is running, is there anyway of finding out what might cause it? maybe feedback to dushmaniac?

thanks again,

Dubstar_04

The high CPU utilization on linux should be fixed now. Using a profiler is usually the best method to finding the cause. I use intel vTune on linux.
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #34
tsp42 Wrote:The high CPU utilization on linux should be fixed now. Using a profiler is usually the best method to finding the cause. I use intel vTune on linux.

That seems to of fixed it. cpu useage is now ~18% compared to >!00% before.

I am seeing a small memory leak, i can't be sure but i think its when loading the guide (timeline).

The memory usage gently climbs from 50mb and never goes down.

i will try and investigate this tonight.

Thank you for your work,

Dubstar_04

All Things PVR
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #35
There does seem to be a memory leak when selecting the EPG:Timeline view.

logs from current build:

Massif log: http://paste.ubuntu.com/699172/
Massive output file: http://paste.ubuntu.com/699173/
Valgrind log: http://paste.ubuntu.com/699174/

All Things PVR
(This post was last modified: 2011-09-29 18:11 by dubstar_04.)
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #36
Maybe related to this?
I will try to improve the timers (and maybe the sorting of records) before investigation this leak further (not as severe as the last leak). It is a bit complicated to map the MythTV timers to the XBMC PVR timers (suggestions are appreciated).
I've been thinking about showing a custom window when adding a recording with the different mythtv specific options at least this would reduce the need to mess around with the XBMC PVR code.
(This post was last modified: 2011-09-29 22:35 by tsp42.)
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #37
tsp42 Wrote:Maybe related to this?
I will try to improve the timers (and maybe the sorting of records) before investigation this leak further (not as severe as the last leak). It is a bit complicated to map the MythTV timers to the XBMC PVR timers (suggestions are appreciated).
I've been thinking about showing a custom window when adding a recording with the different mythtv specific options at least this would reduce the need to mess around with the XBMC PVR code.

Dushmaniac may well be aware of the memory leak. I could always add the leak on his git repo next week if its not resolved.

I had a quick look at the timers last week as not all the timers are pulled into xbmc. i never got to the bottom of the issue but it looks like anything that has a blue traffic light in mythtv-frontend is included the yellow ones are missed. the reasons for the colours vary.

I was using a method to not include any timers that ended before the current time.
That made the timers window easier to understand as only current and future recordings were shown.

I will try and have a look at how the mapping works and see if i can understand it, although you have probably thought of everything i would suggest!

if you can add a window through the cmyth add-on, that would be superb. maybe speak with dushmaniac regarding his intention to implement recording types in the future as i'm sure he would accept patches to the pvr code?

All Things PVR
(This post was last modified: 2011-09-30 07:39 by dubstar_04.)
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #38
I've added sorting of recordings by date to the context menu.

dubstar_04: Can you check if the missing timers are in the sql database (in the record table)?
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #39
tsp42 Wrote:I've added sorting of recordings by date to the context menu.

dubstar_04: Can you check if the missing timers are in the sql database (in the record table)?

I have just built the latest git.

The recordings are much easier to understand now. thank you.

I have done a side by side comparison of the mythconverge record table and xbmc timers and they tie up!!

The majority of the mythtv pvr add-on is now complete!!

just a few little nips and tucks and tweaks here and there (to the pvr framework) and it will be a usable everyday front end!!!

really great work!!

I can't thank you enough for the constant updates and fixes.

All Things PVR
find quote
Hirs Offline
Senior Member
Posts: 100
Joined: Oct 2008
Reputation: 0
Post: #40
Could you merge with master? there is a new feature I already can't live without it Smile

http://forum.xbmc.org/showthread.php?p=898913

I feel the perfect PVR is coming Smile
find quote
Post Reply