macplnk freezes depending on optimisation level

28 views
Skip to first unread message

Slo Mo

unread,
Feb 7, 2014, 2:41:06 PM2/7/14
to pl...@googlegroups.com
Hi,

I'm trying out pl-nk. Looks very interesting!
I got macplnk to build and run nicely, but when I tried to change the Optimization Level (I'm especially interested in performance), anything above -O1 would freeze macplnk on launch.

When I force quit the debugger would show a SIGTERM on line# 860 of plank_AtomicInline_Mac_X86_32.h:

#if __PIC__

    __asm__ __volatile__("pushl %%ebx;"          <----------------------- SIGTERM

                         "movl %6,%%ebx;"


Or on one other attempt I got a SIGTERM on line# 406 in plank_LockFreeQueue.c

        {

            if (headElement == pl_AtomicPX_GetUnchecked ((PlankAtomicPXRef)&(p->tail))) // changed to unchecked         <----------------------- SIGTERM

            { 

Any idea what is going on?

I'm on Xcode 5.0.2 / OS X 10.9.1

best regards,
slomo

Martin Robinson

unread,
Feb 8, 2014, 1:59:34 AM2/8/14
to pl...@googlegroups.com
Hi,

Thanks, I made some changes to the atomics recently and noticed that issue under the iOS Simulator when optimising but assumed it was just the simulator. I thought I'd checked but, obviously not!

I'll prioritise looking at this over the next few days and get back to you.

Best
Martin

--
You received this message because you are subscribed to the Google Groups "pl-nk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pl-nk+un...@googlegroups.com.
To post to this group, send email to pl...@googlegroups.com.
Visit this group at http://groups.google.com/group/pl-nk.
For more options, visit https://groups.google.com/groups/opt_out.

Martin Robinson

———————————

Martin Robinson

unread,
Feb 8, 2014, 7:11:49 AM2/8/14
to pl...@googlegroups.com
Hi

Thanks for the bug report. It should be all working now (?!). I checked on x86 and x86_64, it was the asm code.

I've tagged a new version:
http://pl-nk.googlecode.com/archive/v0.4.5.zip

Let me know how you get on.

Best
Martin


On Saturday, 8 February 2014 06:59:34 UTC, Martin Robinson wrote:
Hi,

Thanks, I made some changes to the atomics recently and noticed that issue under the iOS Simulator when optimising but assumed it was just the simulator. I thought I'd checked but, obviously not!

I'll prioritise looking at this over the next few days and get back to you.

Best
Martin

On 7 Feb 2014, at 19:41, Slo Mo wrote:

Hi,

I'm trying out pl-nk. Looks very interesting!
I got macplnk to build and run nicely, but when I tried to change the Optimization Level (I'm especially interested in performance), anything above -O1 would freeze macplnk on launch.

When I force quit the debugger would show a SIGTERM on line# 860 of plank_AtomicInline_Mac_X86_32.h:

#if __PIC__

    __asm__ __volatile__("pushl %%ebx;"          <----------------------- SIGTERM

                         "movl %6,%%ebx;"


Or on one other attempt I got a SIGTERM on line# 406 in plank_LockFreeQueue.c

        {

            if (headElement == pl_AtomicPX_GetUnchecked ((PlankAtomicPXRef)&(p->tail))) // changed to unchecked         <----------------------- SIGTERM

            { 

Any idea what is going on?

I'm on Xcode 5.0.2 / OS X 10.9.1

best regards,
slomo

--
You received this message because you are subscribed to the Google Groups "pl-nk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pl-nk+unsubscribe@googlegroups.com.

To post to this group, send email to pl...@googlegroups.com.
Visit this group at http://groups.google.com/group/pl-nk.
For more options, visit https://groups.google.com/groups/opt_out.

Slo Mo

unread,
Aug 26, 2014, 1:05:36 PM8/26/14
to pl...@googlegroups.com
Hi Martin!

Sorry, it took me ages to get back to this.
But yes that seems to be working now :)
And since the performance looks really promising I'm having a closer look - now that I have a chance again.

I wonder if you have the time and energy to answer these first random questions or remarks that I've come across?

- First of all, forgive me as some of the concepts behind pl-nk remain kind of cloudy to me despite reading the "core concepts"-doc several times. I'm not too familiar with Music-N languages etc... I seem to have an easier time grasping the concepts behind, say Web Audio or AUAudioGraph and the like. 
But how would one go about some dynamic routing / modularity in coding with pl-nk?
For example, let's say the premise is that I have a SignalPlay playing back a sound file.
Then based on some UI feedback I'd like to add a Delay "after" the SignalPlay.
Then - again based on some choice from the UI - I'd like to add a LPF "in between" the SignalPlay and the Delay.
...
Is this sort of stuff possible? What sort of approach / paradigms / idioms might I want to use to get there? Especially if we already think on to how I might eventually wrap this sort of functionality in a custom class etc.

- What should I generally know about writing my own units/channels?

- If I have, say, a SignalPlay and a a 1000-step NSSlider controlling the rate of SignalPlay by means of a FloatVariable (would that generally even be the way to do it?) - then I wrap the FloatVariable into a Lag::ar, to smooth the control - i seem to get way more jaggy end result on the playback rate. Is there something I misunderstood concerning the use of Lag?
In general, I'm looking at what might be involved in integrating stuff like OSC-control with pl-nk.

- Finally, one little thing I noticed while playing around is that if I use the FilePlay::Simple with a negative rate - or change from positive to negative - the speakers "blow up".


Thanks so much if you're able to address these questions! 
And thanks for a very promising framework.

best, 
slomo


To unsubscribe from this group and stop receiving emails from it, send an email to pl-nk+un...@googlegroups.com.

To post to this group, send email to pl...@googlegroups.com.
Visit this group at http://groups.google.com/group/pl-nk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages