summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/run-profiling.sh31
-rw-r--r--libs/ardour/test/profiling/lots_of_regions.cc47
-rw-r--r--libs/ardour/test/profiling/sessions/1region/1region.ardour181
-rw-r--r--libs/ardour/test/profiling/sessions/1region/1region.ardour.bak148
-rw-r--r--libs/ardour/test/profiling/sessions/1region/1region.history38
-rw-r--r--libs/ardour/test/profiling/sessions/1region/1region.history.bak2
-rw-r--r--libs/ardour/test/profiling/sessions/1region/instant.xml13
-rw-r--r--libs/ardour/test/test_util.h4
-rw-r--r--libs/ardour/wscript62
9 files changed, 487 insertions, 39 deletions
diff --git a/libs/ardour/run-profiling.sh b/libs/ardour/run-profiling.sh
index f490080446..30daac9e6e 100644
--- a/libs/ardour/run-profiling.sh
+++ b/libs/ardour/run-profiling.sh
@@ -8,6 +8,11 @@ if [ ! -f './tempo.cc' ]; then
exit 1;
fi
+if [ "$1" == "" ]; then
+ echo "Syntax: run-profiling.sh [flag] <test> [<args>]"
+ exit 1;
+fi
+
cd ../..
top=`pwd`
cd build
@@ -23,15 +28,23 @@ export ARDOUR_MCP_PATH="../mcp"
export ARDOUR_DLL_PATH=$libs
export ARDOUR_DATA_PATH=$top/gtk2_ardour:$top/build/gtk2_ardour:.
-# export LD_PRELOAD=/home/carl/src/libfakejack/libjack.so
-session='32tracks'
+export LD_PRELOAD=/home/carl/src/libfakejack/libjack.so
+# session='32tracks'
+
+p=$1
+if [ "$p" == "--debug" -o "$p" == "--valgrind" -o "$p" == "--callgrind" ]; then
+ f=$p
+ p=$2
+ shift 1
+fi
+shift 1
-if [ "$1" == "--debug" ]; then
- gdb --args ./libs/ardour/run-profiling $session
-elif [ "$1" == "--valgrind" ]; then
- valgrind ./libs/ardour/run-profiling $session
-elif [ "$1" == "--callgrind" ]; then
- valgrind --tool=callgrind ./libs/ardour/run-profiling $session
+if [ "$f" == "--debug" ]; then
+ gdb --args ./libs/ardour/$p $*
+elif [ "$f" == "--valgrind" ]; then
+ valgrind ./libs/ardour/$p $*
+elif [ "$f" == "--callgrind" ]; then
+ valgrind --tool=callgrind ./libs/ardour/$p $*
else
- ./libs/ardour/run-profiling $session
+ ./libs/ardour/$p $*
fi
diff --git a/libs/ardour/test/profiling/lots_of_regions.cc b/libs/ardour/test/profiling/lots_of_regions.cc
new file mode 100644
index 0000000000..51166265bf
--- /dev/null
+++ b/libs/ardour/test/profiling/lots_of_regions.cc
@@ -0,0 +1,47 @@
+#include "test_util.h"
+#include "ardour/ardour.h"
+#include "ardour/midi_track.h"
+#include "ardour/midi_region.h"
+#include "ardour/session.h"
+#include "ardour/playlist.h"
+#include "pbd/stateful_diff_command.h"
+
+using namespace std;
+using namespace ARDOUR;
+using namespace PBD;
+
+int
+main (int argc, char* argv[])
+{
+ ARDOUR::init (false, true);
+ Session* session = load_session ("../libs/ardour/test/profiling/sessions/1region", "1region.ardour");
+
+ /* Find the track */
+ boost::shared_ptr<MidiTrack> track = boost::dynamic_pointer_cast<MidiTrack> (session->get_routes()->back());
+ assert (track);
+
+ /* And the playlist */
+ boost::shared_ptr<Playlist> playlist = track->playlist ();
+ assert (playlist);
+
+ /* And the region */
+ boost::shared_ptr<MidiRegion> region = boost::dynamic_pointer_cast<MidiRegion> (playlist->region_list().rlist().front());
+ assert (region);
+
+ /* Duplicate it a lot */
+ session->begin_reversible_command ("foo");
+ playlist->clear_changes ();
+ playlist->duplicate (region, region->last_frame(), 1000);
+ session->add_command (new StatefulDiffCommand (playlist));
+ session->commit_reversible_command ();
+
+ /* Undo that */
+ session->undo (1);
+
+ /* And do it again */
+ session->begin_reversible_command ("foo");
+ playlist->clear_changes ();
+ playlist->duplicate (region, region->last_frame(), 1000);
+ session->add_command (new StatefulDiffCommand (playlist));
+ session->commit_reversible_command ();
+}
diff --git a/libs/ardour/test/profiling/sessions/1region/1region.ardour b/libs/ardour/test/profiling/sessions/1region/1region.ardour
new file mode 100644
index 0000000000..b846225009
--- /dev/null
+++ b/libs/ardour/test/profiling/sessions/1region/1region.ardour
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Session version="3001" name="1region" sample-rate="48000" id-counter="142" event-counter="2">
+ <Config>
+ <Option name="xfade-model" value="FullCrossfade"/>
+ <Option name="xfade-choice" value="ConstantPowerMinus3dB"/>
+ <Option name="auto-xfade" value="1"/>
+ <Option name="short-xfade-seconds" value="0.015"/>
+ <Option name="destructive-xfade-msecs" value="2"/>
+ <Option name="use-region-fades" value="1"/>
+ <Option name="show-region-fades" value="1"/>
+ <Option name="native-file-data-format" value="FormatFloat"/>
+ <Option name="native-file-header-format" value="WAVE"/>
+ <Option name="auto-play" value="0"/>
+ <Option name="auto-return" value="0"/>
+ <Option name="auto-input" value="1"/>
+ <Option name="punch-in" value="0"/>
+ <Option name="punch-out" value="0"/>
+ <Option name="subframes-per-frame" value="100"/>
+ <Option name="timecode-format" value="timecode_30"/>
+ <Option name="raid-path" value=""/>
+ <Option name="audio-search-path" value=""/>
+ <Option name="midi-search-path" value=""/>
+ <Option name="auditioner-output-left" value="default"/>
+ <Option name="auditioner-output-right" value="default"/>
+ <Option name="timecode-source-is-synced" value="1"/>
+ <Option name="jack-time-master" value="1"/>
+ <Option name="use-video-sync" value="0"/>
+ <Option name="video-pullup" value="0"/>
+ <Option name="show-summary" value="1"/>
+ <Option name="show-group-tabs" value="1"/>
+ <Option name="external-sync" value="0"/>
+ <Option name="sync-source" value="JACK"/>
+ <Option name="insert-merge-policy" value="InsertMergeRelax"/>
+ <Option name="timecode-offset" value="0"/>
+ <Option name="timecode-offset-negative" value="1"/>
+ <Option name="glue-new-markers-to-bars-and-beats" value="0"/>
+ <Option name="midi-copy-is-fork" value="0"/>
+ <Option name="glue-new-regions-to-bars-and-beats" value="0"/>
+ </Config>
+ <Metadata/>
+ <Sources>
+ <Source name="MIDI 1-1.mid" type="midi" flags="Writable,CanRename" id="118" origin=""/>
+ </Sources>
+ <Regions/>
+ <Locations>
+ <Location id="86" name="Loop" start="1633716" end="2118148" flags="IsAutoLoop,IsHidden" locked="no" position-lock-style="AudioTime"/>
+ <Location id="87" name="Punch" start="0" end="1" flags="IsAutoPunch,IsHidden" locked="no" position-lock-style="AudioTime"/>
+ <Location id="133" name="session" start="1633716" end="2118148" flags="IsSessionRange" locked="no" position-lock-style="AudioTime"/>
+ </Locations>
+ <Bundles/>
+ <Routes>
+ <Route id="21" name="master" default-type="audio" flags="MasterOut" active="yes" phase-invert="00" denormal-protection="no" meter-point="MeterPostFader" order-keys="editor=0:signal=0" self-solo="no" soloed-by-upstream="0" soloed-by-downstream="0" solo-isolated="no" solo-safe="no">
+ <IO name="master" id="38" direction="Input" default-type="audio" user-latency="0">
+ <Port type="audio" name="master/audio_in 1"/>
+ <Port type="audio" name="master/audio_in 2"/>
+ </IO>
+ <IO name="master" id="39" direction="Output" default-type="audio" user-latency="0">
+ <Port type="audio" name="master/audio_out 1">
+ <Connection other="system:playback_1"/>
+ </Port>
+ <Port type="audio" name="master/audio_out 2">
+ <Connection other="system:playback_2"/>
+ </Port>
+ </IO>
+ <Controllable name="solo" id="23" flags="Toggle" value="0.000000000000"/>
+ <Controllable name="mute" id="25" flags="Toggle" value="0.000000000000"/>
+ <MuteMaster mute-point="PreFader,PostFader,Listen,Main" muted="no"/>
+ <RemoteControl id="318"/>
+ <Pannable>
+ <Controllable name="pan-azimuth" id="29" flags="" value="0.500000000000"/>
+ <Controllable name="pan-width" id="33" flags="" value="1.000000000000"/>
+ <Controllable name="pan-elevation" id="31" flags="" value="0.000000000000"/>
+ <Controllable name="pan-frontback" id="35" flags="" value="0.000000000000"/>
+ <Controllable name="pan-lfe" id="37" flags="" value="0.000000000000"/>
+ <Automation/>
+ </Pannable>
+ <Processor id="40" name="Amp" active="yes" user-latency="0" type="amp">
+ <Controllable name="gaincontrol" id="42" flags="GainLike" value="1.000000000000"/>
+ </Processor>
+ <Processor id="43" name="Meter" active="yes" user-latency="0" type="meter"/>
+ <Processor id="44" name="master" active="yes" user-latency="0" own-input="yes" own-output="no" output="master" type="main-outs" role="Main">
+ <PannerShell bypassed="no">
+ <Panner type="Equal Power Stereo"/>
+ </PannerShell>
+ </Processor>
+ </Route>
+ <Route id="88" name="MIDI 1" default-type="midi" active="yes" phase-invert="" denormal-protection="no" meter-point="MeterPostFader" order-keys="editor=1:signal=1" self-solo="no" soloed-by-upstream="0" soloed-by-downstream="0" solo-isolated="no" solo-safe="no" monitoring="" saved-meter-point="MeterPostFader" note-mode="Sustained" step-editing="no" midi-thru="yes" input-active="yes">
+ <IO name="MIDI 1" id="105" direction="Input" default-type="midi" user-latency="0">
+ <Port type="midi" name="MIDI 1/midi_in 1"/>
+ </IO>
+ <IO name="MIDI 1" id="106" direction="Output" default-type="midi" user-latency="0">
+ <Port type="midi" name="MIDI 1/midi_out 1"/>
+ </IO>
+ <Controllable name="solo" id="90" flags="Toggle" value="0.000000000000"/>
+ <Controllable name="mute" id="92" flags="Toggle" value="0.000000000000"/>
+ <MuteMaster mute-point="PreFader,PostFader,Listen,Main" muted="no"/>
+ <RemoteControl id="2"/>
+ <Pannable>
+ <Controllable name="pan-azimuth" id="96" flags="" value="0.500000000000"/>
+ <Controllable name="pan-width" id="100" flags="" value="0.000000000000"/>
+ <Controllable name="pan-elevation" id="98" flags="" value="0.000000000000"/>
+ <Controllable name="pan-frontback" id="102" flags="" value="0.000000000000"/>
+ <Controllable name="pan-lfe" id="104" flags="" value="0.000000000000"/>
+ <Automation/>
+ </Pannable>
+ <Processor id="107" name="Amp" active="yes" user-latency="0" type="amp">
+ <Controllable name="gaincontrol" id="109" flags="GainLike" value="1.000000000000"/>
+ </Processor>
+ <Processor id="110" name="Meter" active="yes" user-latency="0" type="meter"/>
+ <Processor id="111" name="MIDI 1" active="yes" user-latency="0" own-input="yes" own-output="no" output="MIDI 1" type="main-outs" role="Main">
+ <PannerShell bypassed="no"/>
+ </Processor>
+ <Controllable name="recenable" id="113" flags="Toggle" value="0.000000000000"/>
+ <Diskstream flags="Recordable" playlist="MIDI 1.1" name="MIDI 1" id="115" speed="1.000000" capture-alignment="Automatic" channel-mode="AllChannels" channel-mask="0xffff"/>
+ </Route>
+ </Routes>
+ <Playlists>
+ <Playlist id="116" name="MIDI 1.1" type="midi" orig-track-id="88" frozen="no" combine-ops="0">
+ <Region locked="0" name="MIDI 1-1" position="1633716" length="484432" stretch="1" muted="0" opaque="1" automatic="0" whole-file="0" import="0" external="0" sync-marked="0" left-of-split="0" right-of-split="0" hidden="0" position-locked="0" valid-transients="0" start="0" sync-position="0" ancestral-start="0" ancestral-length="0" shift="1" positional-lock-style="MusicTime" layering-index="0" start-beats="0" length-beats="20.1846666667" id="131" type="midi" first-edit="nothing" bbt-position="18|1|137" source-0="118" master-source-0="118"/>
+ </Playlist>
+ </Playlists>
+ <UnusedPlaylists/>
+ <RouteGroups/>
+ <Click>
+ <IO name="click" id="46" direction="Output" default-type="audio" user-latency="0">
+ <Port type="audio" name="click/audio_out 1">
+ <Connection other="system:playback_1"/>
+ </Port>
+ <Port type="audio" name="click/audio_out 2">
+ <Connection other="system:playback_2"/>
+ </Port>
+ </IO>
+ <Processor id="47" name="Amp" active="yes" user-latency="0" type="amp">
+ <Controllable name="gaincontrol" id="49" flags="GainLike" value="1.000000000000"/>
+ </Processor>
+ </Click>
+ <NamedSelections/>
+ <Speakers>
+ <Speaker azimuth="0" elevation="0" distance="1"/>
+ <Speaker azimuth="180" elevation="0" distance="0"/>
+ </Speakers>
+ <TempoMap>
+ <Tempo start="1|1|0" beats-per-minute="120.000000" note-type="4.000000" movable="no"/>
+ <Meter start="1|1|0" note-type="4.000000" divisions-per-bar="4.000000" movable="no"/>
+ </TempoMap>
+ <ControlProtocols>
+ <Protocol name="Open Sound Control (OSC)" active="no"/>
+ <Protocol name="Generic MIDI" feedback="0" feedback-interval="10000" active="yes">
+ <Controls/>
+ </Protocol>
+ <Protocol name="Mackie" bank="0" ipmidi-base="21928" device-profile="" device-name="Mackie Control Universal Pro" active="yes"/>
+ </ControlProtocols>
+ <Extra>
+ <UI>
+ <Window name="M-21-40" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="M-21-43" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="M-21-44" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="M-88-107" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="M-88-110" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="M-88-111" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="R-88-107" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="R-88-110" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <Window name="R-88-111" visible="no" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
+ <GUIObjectState>
+ <Object id="route 21" color="3416:21888:21293"/>
+ <Object id="rtav 21" height="62" visible="1"/>
+ <Object id="automation 42" height="62" visible="0"/>
+ <Object id="automation 29" height="62" visible="0"/>
+ <Object id="automation 33" height="62" visible="0"/>
+ <Object id="strip 21" visible="1">
+ <Object id="processor 40"/>
+ </Object>
+ <Object id="route 88" color="7490:6780:29796"/>
+ <Object id="rtav 88" height="105" visible="1" note-range-min="60" note-range-max="71" color-mode="MeterColors"/>
+ <Object id="strip 88" visible="1">
+ <Object id="processor 107"/>
+ </Object>
+ </GUIObjectState>
+ </UI>
+ </Extra>
+</Session>
diff --git a/libs/ardour/test/profiling/sessions/1region/1region.ardour.bak b/libs/ardour/test/profiling/sessions/1region/1region.ardour.bak
new file mode 100644
index 0000000000..ff17374272
--- /dev/null
+++ b/libs/ardour/test/profiling/sessions/1region/1region.ardour.bak
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Session version="3001" name="1region" sample-rate="48000" id-counter="120" event-counter="0">
+ <Config>
+ <Option name="xfade-model" value="FullCrossfade"/>
+ <Option name="xfade-choice" value="ConstantPowerMinus3dB"/>
+ <Option name="auto-xfade" value="1"/>
+ <Option name="short-xfade-seconds" value="0.015"/>
+ <Option name="destructive-xfade-msecs" value="2"/>
+ <Option name="use-region-fades" value="1"/>
+ <Option name="show-region-fades" value="1"/>
+ <Option name="native-file-data-format" value="FormatFloat"/>
+ <Option name="native-file-header-format" value="WAVE"/>
+ <Option name="auto-play" value="0"/>
+ <Option name="auto-return" value="0"/>
+ <Option name="auto-input" value="1"/>
+ <Option name="punch-in" value="0"/>
+ <Option name="punch-out" value="0"/>
+ <Option name="subframes-per-frame" value="100"/>
+ <Option name="timecode-format" value="timecode_30"/>
+ <Option name="raid-path" value=""/>
+ <Option name="audio-search-path" value=""/>
+ <Option name="midi-search-path" value=""/>
+ <Option name="auditioner-output-left" value="default"/>
+ <Option name="auditioner-output-right" value="default"/>
+ <Option name="timecode-source-is-synced" value="1"/>
+ <Option name="jack-time-master" value="1"/>
+ <Option name="use-video-sync" value="0"/>
+ <Option name="video-pullup" value="0"/>
+ <Option name="show-summary" value="1"/>
+ <Option name="show-group-tabs" value="1"/>
+ <Option name="external-sync" value="0"/>
+ <Option name="sync-source" value="JACK"/>
+ <Option name="insert-merge-policy" value="InsertMergeRelax"/>
+ <Option name="timecode-offset" value="0"/>
+ <Option name="timecode-offset-negative" value="1"/>
+ <Option name="glue-new-markers-to-bars-and-beats" value="0"/>
+ <Option name="midi-copy-is-fork" value="0"/>
+ <Option name="glue-new-regions-to-bars-and-beats" value="0"/>
+ </Config>
+ <Metadata/>
+ <Sources/>
+ <Regions/>
+ <Locations>
+ <Location id="86" name="Loop" start="0" end="1" flags="IsAutoLoop,IsHidden" locked="no" position-lock-style="AudioTime"/>
+ <Location id="87" name="Punch" start="0" end="1" flags="IsAutoPunch,IsHidden" locked="no" position-lock-style="AudioTime"/>
+ </Locations>
+ <Bundles/>
+ <Routes>
+ <Route id="21" name="master" default-type="audio" flags="MasterOut" active="yes" phase-invert="00" denormal-protection="no" meter-point="MeterPostFader" order-keys="editor=0:signal=0" self-solo="no" soloed-by-upstream="0" soloed-by-downstream="0" solo-isolated="no" solo-safe="no">
+ <IO name="master" id="38" direction="Input" default-type="audio" user-latency="0">
+ <Port type="audio" name="master/audio_in 1"/>
+ <Port type="audio" name="master/audio_in 2"/>
+ </IO>
+ <IO name="master" id="39" direction="Output" default-type="audio" user-latency="0">
+ <Port type="audio" name="master/audio_out 1">
+ <Connection other="system:playback_1"/>
+ </Port>
+ <Port type="audio" name="master/audio_out 2">
+ <Connection other="system:playback_2"/>
+ </Port>
+ </IO>
+ <Controllable name="solo" id="23" flags="Toggle" value="0.000000000000"/>
+ <Controllable name="mute" id="25" flags="Toggle" value="0.000000000000"/>
+ <MuteMaster mute-point="PreFader,PostFader,Listen,Main" muted="no"/>
+ <RemoteControl id="318"/>
+ <Pannable>
+ <Controllable name="pan-azimuth" id="29" flags="" value="0.500000000000"/>
+ <Controllable name="pan-width" id="33" flags="" value="1.000000000000"/>
+ <Controllable name="pan-elevation" id="31" flags="" value="0.000000000000"/>
+ <Controllable name="pan-frontback" id="35" flags="" value="0.000000000000"/>
+ <Controllable name="pan-lfe" id="37" flags="" value="0.000000000000"/>
+ <Automation/>
+ </Pannable>
+ <Processor id="40" name="Amp" active="yes" user-latency="0" type="amp">
+ <Controllable name="gaincontrol" id="42" flags="GainLike" value="1.000000000000"/>
+ </Processor>
+ <Processor id="43" name="Meter" active="yes" user-latency="0" type="meter"/>
+ <Processor id="44" name="master" active="yes" user-latency="0" own-input="yes" own-output="no" output="master" type="main-outs" role="Main">
+ <PannerShell bypassed="no">
+ <Panner type="Equal Power Stereo"/>
+ </PannerShell>
+ </Processor>
+ </Route>
+ <Route id="88" name="MIDI 1" default-type="midi" active="yes" phase-invert="" denormal-protection="no" meter-point="MeterPostFader" order-keys="signal=2" self-solo="no" soloed-by-upstream="0" soloed-by-downstream="0" solo-isolated="no" solo-safe="no" monitoring="" saved-meter-point="MeterPostFader" note-mode="Sustained" step-editing="no" midi-thru="yes" input-active="yes">
+ <IO name="MIDI 1" id="105" direction="Input" default-type="midi" user-latency="0">
+ <Port type="midi" name="MIDI 1/midi_in 1"/>
+ </IO>
+ <IO name="MIDI 1" id="106" direction="Output" default-type="midi" user-latency="0">
+ <Port type="midi" name="MIDI 1/midi_out 1"/>
+ </IO>
+ <Controllable name="solo" id="90" flags="Toggle" value="0.000000000000"/>
+ <Controllable name="mute" id="92" flags="Toggle" value="0.000000000000"/>
+ <MuteMaster mute-point="PreFader,PostFader,Listen,Main" muted="no"/>
+ <RemoteControl id="2"/>
+ <Pannable>
+ <Controllable name="pan-azimuth" id="96" flags="" value="0.500000000000"/>
+ <Controllable name="pan-width" id="100" flags="" value="0.000000000000"/>
+ <Controllable name="pan-elevation" id="98" flags="" value="0.000000000000"/>
+ <Controllable name="pan-frontback" id="102" flags="" value="0.000000000000"/>
+ <Controllable name="pan-lfe" id="104" flags="" value="0.000000000000"/>
+ <Automation/>
+ </Pannable>
+ <Processor id="107" name="Amp" active="yes" user-latency="0" type="amp">
+ <Controllable name="gaincontrol" id="109" flags="GainLike" value="1.000000000000"/>
+ </Processor>
+ <Processor id="110" name="Meter" active="yes" user-latency="0" type="meter"/>
+ <Processor id="111" name="MIDI 1" active="yes" user-latency="0" own-input="yes" own-output="no" output="MIDI 1" type="main-outs" role="Main">
+ <PannerShell bypassed="no"/>
+ </Processor>
+ <Controllable name="recenable" id="113" flags="Toggle" value="0.000000000000"/>
+ <Diskstream flags="Recordable" playlist="MIDI 1.1" name="MIDI 1" id="115" speed="1.000000" capture-alignment="Automatic" channel-mode="AllChannels" channel-mask="0xffff"/>
+ </Route>
+ </Routes>
+ <Playlists>
+ <Playlist id="116" name="MIDI 1.1" type="midi" orig-track-id="88" frozen="no" combine-ops="0"/>
+ </Playlists>
+ <UnusedPlaylists/>
+ <RouteGroups/>
+ <Click>
+ <IO name="click" id="46" direction="Output" default-type="audio" user-latency="0">
+ <Port type="audio" name="click/audio_out 1">
+ <Connection other="system:playback_1"/>
+ </Port>
+ <Port type="audio" name="click/audio_out 2">
+ <Connection other="system:playback_2"/>
+ </Port>
+ </IO>
+ <Processor id="47" name="Amp" active="yes" user-latency="0" type="amp">
+ <Controllable name="gaincontrol" id="49" flags="GainLike" value="1.000000000000"/>
+ </Processor>
+ </Click>
+ <NamedSelections/>
+ <Speakers>
+ <Speaker azimuth="0" elevation="0" distance="1"/>
+ <Speaker azimuth="180" elevation="0" distance="0"/>
+ </Speakers>
+ <TempoMap>
+ <Tempo start="1|1|0" beats-per-minute="120.000000" note-type="4.000000" movable="no"/>
+ <Meter start="1|1|0" note-type="4.000000" divisions-per-bar="4.000000" movable="no"/>
+ </TempoMap>
+ <ControlProtocols>
+ <Protocol name="Open Sound Control (OSC)" active="no"/>
+ <Protocol name="Generic MIDI" feedback="0" feedback-interval="10000" active="yes">
+ <Controls/>
+ </Protocol>
+ <Protocol name="Mackie" bank="0" ipmidi-base="21928" device-profile="" device-name="Mackie Control Universal Pro" active="yes"/>
+ </ControlProtocols>
+</Session>
diff --git a/libs/ardour/test/profiling/sessions/1region/1region.history b/libs/ardour/test/profiling/sessions/1region/1region.history
new file mode 100644
index 0000000000..d836783943
--- /dev/null
+++ b/libs/ardour/test/profiling/sessions/1region/1region.history
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UndoHistory>
+ <UndoTransaction tv-sec="1339964796" tv-usec="189501" name="create region">
+ <StatefulDiffCommand obj-id="116" type-name="ARDOUR::MidiPlaylist">
+ <Changes>
+ <Regions>
+ <Add id="131"/>
+ </Regions>
+ </Changes>
+ </StatefulDiffCommand>
+ </UndoTransaction>
+ <UndoTransaction tv-sec="1339964800" tv-usec="298226" name="Region end trim">
+ <StatefulDiffCommand obj-id="131" type-name="ARDOUR::MidiRegion">
+ <Changes>
+ <length from="96000" to="484432"/>
+ <length-beats from="4" to="20.1846666667"/>
+ </Changes>
+ </StatefulDiffCommand>
+ </UndoTransaction>
+ <UndoTransaction tv-sec="1339964802" tv-usec="348425" name="add note">
+ <NoteDiffCommand midi-source="118">
+ <ChangedNotes/>
+ <AddedNotes>
+ <note id="0" note="69" channel="0" time="3.656" length="4.78183" velocity="64"/>
+ </AddedNotes>
+ <RemovedNotes/>
+ </NoteDiffCommand>
+ </UndoTransaction>
+ <UndoTransaction tv-sec="1339964802" tv-usec="958308" name="add note">
+ <NoteDiffCommand midi-source="118">
+ <ChangedNotes/>
+ <AddedNotes>
+ <note id="1" note="65" channel="0" time="5.31125" length="5.33358" velocity="64"/>
+ </AddedNotes>
+ <RemovedNotes/>
+ </NoteDiffCommand>
+ </UndoTransaction>
+</UndoHistory>
diff --git a/libs/ardour/test/profiling/sessions/1region/1region.history.bak b/libs/ardour/test/profiling/sessions/1region/1region.history.bak
new file mode 100644
index 0000000000..6dd2506a89
--- /dev/null
+++ b/libs/ardour/test/profiling/sessions/1region/1region.history.bak
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UndoHistory/>
diff --git a/libs/ardour/test/profiling/sessions/1region/instant.xml b/libs/ardour/test/profiling/sessions/1region/instant.xml
new file mode 100644
index 0000000000..6ee1811962
--- /dev/null
+++ b/libs/ardour/test/profiling/sessions/1region/instant.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<instant>
+ <Editor id="11" mixer-width="Wide" zoom-focus="ZoomFocusPlayhead" zoom="4413.999148" snap-to="SnapToBeat" snap-mode="SnapOff" internal-snap-to="SnapToBeat" internal-snap-mode="SnapOff" pre-internal-snap-to="SnapToBeatDiv3" pre-internal-snap-mode="SnapOff" edit-point="EditAtPlayhead" playhead="0" left-frame="0" y-origin="0.000000" show-measures="yes" maximised="no" follow-playhead="no" stationary-playhead="no" region-list-sort-type="ByEndInFile" mouse-mode="MouseObject" internal-edit="yes" join-object-range="no" show-editor-mixer="yes" show-editor-list="yes" editor-list-page="1" show-marker-lines="yes" nudge-clock-value="240000">
+ <geometry x-size="1366" y-size="714" x-pos="0" y-pos="27" edit-horizontal-pane-pos="1011" notebook-shrunk="0" edit-vertical-pane-pos="518"/>
+ <Buttons>
+ <Press/>
+ <Release/>
+ </Buttons>
+ <Selection/>
+ <RegionList sort-type="ByEndInFile" sort-ascending="yes" show-all="no" show-automatic-regions="yes"/>
+ </Editor>
+ <Mixer narrow-strips="no" show-mixer="no"/>
+</instant>
diff --git a/libs/ardour/test/test_util.h b/libs/ardour/test/test_util.h
index 4ee33b3dd6..436580d6cb 100644
--- a/libs/ardour/test/test_util.h
+++ b/libs/ardour/test/test_util.h
@@ -1,3 +1,7 @@
+#include <string>
+
+class XMLNode;
+
namespace ARDOUR {
class Session;
}
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 9d135392f6..89efbdab49 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -475,37 +475,39 @@ def build(bld):
testobj.source += [ 'sse_functions_64bit.s' ]
# Profiling
- profilingobj = bld(features = 'cxx cxxprogram')
- profilingobj.source = '''
- test/dummy_lxvst.cc
- test/test_util.cc
- test/profiling/runpc.cc
- '''.split()
-
- profilingobj.includes = obj.includes
- profilingobj.includes.append ('test')
- profilingobj.uselib = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
+ for p in ['runpc', 'lots_of_regions']:
+ profilingobj = bld(features = 'cxx cxxprogram')
+ profilingobj.source = '''
+ test/dummy_lxvst.cc
+ test/test_util.cc
+ '''.split()
+
+ profilingobj.source.append('test/profiling/%s.cc' % p)
+
+ profilingobj.includes = obj.includes
+ profilingobj.includes.append ('test')
+ profilingobj.uselib = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
'SAMPLERATE','XML','LRDF','COREAUDIO']
- profilingobj.use = ['libpbd','libmidipp','libardour']
- profilingobj.name = 'libardour-profiling'
- profilingobj.target = 'run-profiling'
- profilingobj.install_path = ''
- profilingobj.defines = [
- 'PACKAGE="libardour3profile"',
- 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
- 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
- 'LOCALEDIR="' + os.path.join(
- os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
- 'VAMP_DIR="' + os.path.join(
- os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
- ]
- if bld.env['FPU_OPTIMIZATION']:
- profilingobj.source += [ 'sse_functions_xmm.cc' ]
- if (bld.env['build_target'] == 'i386'
- or bld.env['build_target'] == 'i686'):
- profilingobj.source += [ 'sse_functions.s' ]
- elif bld.env['build_target'] == 'x86_64':
- profilingobj.source += [ 'sse_functions_64bit.s' ]
+ profilingobj.use = ['libpbd','libmidipp','libardour']
+ profilingobj.name = 'libardour-profiling'
+ profilingobj.target = p
+ profilingobj.install_path = ''
+ profilingobj.defines = [
+ 'PACKAGE="libardour3profile"',
+ 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
+ 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
+ 'LOCALEDIR="' + os.path.join(
+ os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
+ 'VAMP_DIR="' + os.path.join(
+ os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
+ ]
+ if bld.env['FPU_OPTIMIZATION']:
+ profilingobj.source += [ 'sse_functions_xmm.cc' ]
+ if (bld.env['build_target'] == 'i386'
+ or bld.env['build_target'] == 'i686'):
+ profilingobj.source += [ 'sse_functions.s' ]
+ elif bld.env['build_target'] == 'x86_64':
+ profilingobj.source += [ 'sse_functions_64bit.s' ]
def shutdown():
autowaf.shutdown()