Commit 97524f1b authored by whitlocb's avatar whitlocb
Browse files

Improved variable menus, etc.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@2756 18c085ea-50e0-402c-830e-de6fd14e8384
parent 46f5ea4a
...@@ -261,6 +261,9 @@ $0 = shift @ARGV; ...@@ -261,6 +261,9 @@ $0 = shift @ARGV;
# Dave Pugmire, Mon Dec 17 12:42:34 EST 2007 # Dave Pugmire, Mon Dec 17 12:42:34 EST 2007
# Add qsub/aprun launch option. # Add qsub/aprun launch option.
# #
# Brad Whitlock, Thu Dec 20 17:19:56 PST 2007
# Added -debug-malloc for the Mac.
#
############################################################################### ###############################################################################
use POSIX qw(ceil); use POSIX qw(ceil);
...@@ -622,6 +625,33 @@ $fullusage = "$usage ...@@ -622,6 +625,33 @@ $fullusage = "$usage
and the visit component name are treated as args and the visit component name are treated as args
to the tool. to the tool.
-debug-malloc <args> <comp>
Run the component with the libMallocDebug library
on MacOS X systems. The libMallocDebug library
lets the MallocDebug application attach to the
instrumented application and retrieve memory
allocation statistics. The -debug-malloc flag
also sets up the environment for the leaks and
heap tools.
Printing heap allocations:
% visit -debug-malloc gui &
% Get the gui's <pid>
% heap <pid>
Printing memory leaks:
% visit -debug-malloc gui &
% Get the gui's <pid>
% leaks <pid>
Run with MallocDebug:
Perl does not seem to be happy with libMallocDebug
so you can run the GUI like this:
% visit -cli
>>> OpenGUI('-debug-malloc', 'MallocDebug', 'gui')
Connect to the gui with MallocDebug and do your
sampling.
-numrestarts <#> Number of attempts to restart a failed engine. -numrestarts <#> Number of attempts to restart a failed engine.
-quiet Don't print the Running message. -quiet Don't print the Running message.
-protocol Print the definitions of the state objects that -protocol Print the definitions of the state objects that
...@@ -674,6 +704,8 @@ $debug_valgrind = ""; ...@@ -674,6 +704,8 @@ $debug_valgrind = "";
@debug_valgrind_args = (); @debug_valgrind_args = ();
$debug_strace = ""; $debug_strace = "";
@debug_strace_args = (); @debug_strace_args = ();
$debug_malloc = "";
@debug_malloc_args = ();
$add_movie_args = 0; $add_movie_args = 0;
$add_diff_args = 0; $add_diff_args = 0;
$add_diffsum_args = 0; $add_diffsum_args = 0;
...@@ -794,7 +826,7 @@ while (scalar(@ARGV) > 0) { ...@@ -794,7 +826,7 @@ while (scalar(@ARGV) > 0) {
} }
} }
} }
elsif ($arg eq "-strace" ) { elsif ($arg eq "-strace" ) {
$debug_strace = shift; $debug_strace = shift;
if (!IsAVisItComponentName($debug_strace)) if (!IsAVisItComponentName($debug_strace))
{ {
...@@ -815,6 +847,38 @@ while (scalar(@ARGV) > 0) { ...@@ -815,6 +847,38 @@ while (scalar(@ARGV) > 0) {
} }
} }
} }
elsif ($arg eq "-debug-malloc" ) {
$debug_malloc = shift;
while (!IsAVisItComponentName($debug_malloc))
{
push @debug_malloc_args, $debug_malloc;
$debug_malloc = shift;
}
if (scalar(@debug_malloc_args) == 0)
{
push @visitargs, "-debug-malloc", $debug_malloc;
}
else
{
push @visitargs, "-debug-malloc", @debug_malloc_args, $debug_malloc;
}
if ($exe_name eq $debug_malloc)
{
$ENV{MallocStackLogging} = "1";
if (scalar(@debug_malloc_args) > 0 and $debug_malloc_args[0] eq "MallocDebug")
{
$ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libMallocDebug.A.dylib";
}
}
else
{
delete $ENV{MallocStackLogging};
if (scalar(@debug_malloc_args) > 0 and $debug_malloc_args[0] eq "MallocDebug")
{
delete $ENV{DYLD_INSERT_LIBRARIES};
}
}
}
elsif ($arg eq "-guesshost" ) { $guesshost = 1; } elsif ($arg eq "-guesshost" ) { $guesshost = 1; }
elsif ($arg eq "-setupenv" ) { $visit_sets_up_environment = 1; } elsif ($arg eq "-setupenv" ) { $visit_sets_up_environment = 1; }
elsif ($arg eq "-quiet" ) { $quiet = 1; push @visitargs, "-quiet"; } elsif ($arg eq "-quiet" ) { $quiet = 1; push @visitargs, "-quiet"; }
......
...@@ -76,6 +76,9 @@ AnimationAttributes::PlaybackMode_FromString(const std::string &s, AnimationAttr ...@@ -76,6 +76,9 @@ AnimationAttributes::PlaybackMode_FromString(const std::string &s, AnimationAttr
return false; return false;
} }
// Type map format string
const char *AnimationAttributes::TypeMapFormatString = "bii";
// **************************************************************************** // ****************************************************************************
// Method: AnimationAttributes::AnimationAttributes // Method: AnimationAttributes::AnimationAttributes
// //
...@@ -85,13 +88,14 @@ AnimationAttributes::PlaybackMode_FromString(const std::string &s, AnimationAttr ...@@ -85,13 +88,14 @@ AnimationAttributes::PlaybackMode_FromString(const std::string &s, AnimationAttr
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
// **************************************************************************** // ****************************************************************************
AnimationAttributes::AnimationAttributes() : AttributeSubject("bii") AnimationAttributes::AnimationAttributes() :
AttributeSubject(AnimationAttributes::TypeMapFormatString)
{ {
pipelineCachingMode = false; pipelineCachingMode = false;
timeout = 1; timeout = 1;
...@@ -107,13 +111,14 @@ AnimationAttributes::AnimationAttributes() : AttributeSubject("bii") ...@@ -107,13 +111,14 @@ AnimationAttributes::AnimationAttributes() : AttributeSubject("bii")
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
// **************************************************************************** // ****************************************************************************
AnimationAttributes::AnimationAttributes(const AnimationAttributes &obj) : AttributeSubject("bii") AnimationAttributes::AnimationAttributes(const AnimationAttributes &obj) :
AttributeSubject(AnimationAttributes::TypeMapFormatString)
{ {
pipelineCachingMode = obj.pipelineCachingMode; pipelineCachingMode = obj.pipelineCachingMode;
timeout = obj.timeout; timeout = obj.timeout;
...@@ -131,7 +136,7 @@ AnimationAttributes::AnimationAttributes(const AnimationAttributes &obj) : Attri ...@@ -131,7 +136,7 @@ AnimationAttributes::AnimationAttributes(const AnimationAttributes &obj) : Attri
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -151,7 +156,7 @@ AnimationAttributes::~AnimationAttributes() ...@@ -151,7 +156,7 @@ AnimationAttributes::~AnimationAttributes()
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -178,7 +183,7 @@ AnimationAttributes::operator = (const AnimationAttributes &obj) ...@@ -178,7 +183,7 @@ AnimationAttributes::operator = (const AnimationAttributes &obj)
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -202,7 +207,7 @@ AnimationAttributes::operator == (const AnimationAttributes &obj) const ...@@ -202,7 +207,7 @@ AnimationAttributes::operator == (const AnimationAttributes &obj) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -223,7 +228,7 @@ AnimationAttributes::operator != (const AnimationAttributes &obj) const ...@@ -223,7 +228,7 @@ AnimationAttributes::operator != (const AnimationAttributes &obj) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -244,7 +249,7 @@ AnimationAttributes::TypeName() const ...@@ -244,7 +249,7 @@ AnimationAttributes::TypeName() const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -272,7 +277,7 @@ AnimationAttributes::CopyAttributes(const AttributeGroup *atts) ...@@ -272,7 +277,7 @@ AnimationAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -298,7 +303,7 @@ AnimationAttributes::CreateCompatible(const std::string &tname) const ...@@ -298,7 +303,7 @@ AnimationAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -325,7 +330,7 @@ AnimationAttributes::NewInstance(bool copy) const ...@@ -325,7 +330,7 @@ AnimationAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -334,9 +339,9 @@ AnimationAttributes::NewInstance(bool copy) const ...@@ -334,9 +339,9 @@ AnimationAttributes::NewInstance(bool copy) const
void void
AnimationAttributes::SelectAll() AnimationAttributes::SelectAll()
{ {
Select(0, (void *)&pipelineCachingMode); Select(ID_pipelineCachingMode, (void *)&pipelineCachingMode);
Select(1, (void *)&timeout); Select(ID_timeout, (void *)&timeout);
Select(2, (void *)&playbackMode); Select(ID_playbackMode, (void *)&playbackMode);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -352,7 +357,7 @@ AnimationAttributes::SelectAll() ...@@ -352,7 +357,7 @@ AnimationAttributes::SelectAll()
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -369,19 +374,19 @@ AnimationAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool fo ...@@ -369,19 +374,19 @@ AnimationAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool fo
// Create a node for AnimationAttributes. // Create a node for AnimationAttributes.
DataNode *node = new DataNode("AnimationAttributes"); DataNode *node = new DataNode("AnimationAttributes");
if(completeSave || !FieldsEqual(0, &defaultObject)) if(completeSave || !FieldsEqual(ID_pipelineCachingMode, &defaultObject))
{ {
addToParent = true; addToParent = true;
node->AddNode(new DataNode("pipelineCachingMode", pipelineCachingMode)); node->AddNode(new DataNode("pipelineCachingMode", pipelineCachingMode));
} }
if(completeSave || !FieldsEqual(1, &defaultObject)) if(completeSave || !FieldsEqual(ID_timeout, &defaultObject))
{ {
addToParent = true; addToParent = true;
node->AddNode(new DataNode("timeout", timeout)); node->AddNode(new DataNode("timeout", timeout));
} }
if(completeSave || !FieldsEqual(2, &defaultObject)) if(completeSave || !FieldsEqual(ID_playbackMode, &defaultObject))
{ {
addToParent = true; addToParent = true;
node->AddNode(new DataNode("playbackMode", PlaybackMode_ToString(playbackMode))); node->AddNode(new DataNode("playbackMode", PlaybackMode_ToString(playbackMode)));
...@@ -406,7 +411,7 @@ AnimationAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool fo ...@@ -406,7 +411,7 @@ AnimationAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool fo
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -454,21 +459,21 @@ void ...@@ -454,21 +459,21 @@ void
AnimationAttributes::SetPipelineCachingMode(bool pipelineCachingMode_) AnimationAttributes::SetPipelineCachingMode(bool pipelineCachingMode_)
{ {
pipelineCachingMode = pipelineCachingMode_; pipelineCachingMode = pipelineCachingMode_;
Select(0, (void *)&pipelineCachingMode); Select(ID_pipelineCachingMode, (void *)&pipelineCachingMode);
} }
void void
AnimationAttributes::SetTimeout(int timeout_) AnimationAttributes::SetTimeout(int timeout_)
{ {
timeout = timeout_; timeout = timeout_;
Select(1, (void *)&timeout); Select(ID_timeout, (void *)&timeout);
} }
void void
AnimationAttributes::SetPlaybackMode(AnimationAttributes::PlaybackMode playbackMode_) AnimationAttributes::SetPlaybackMode(AnimationAttributes::PlaybackMode playbackMode_)
{ {
playbackMode = playbackMode_; playbackMode = playbackMode_;
Select(2, (void *)&playbackMode); Select(ID_playbackMode, (void *)&playbackMode);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -506,7 +511,7 @@ AnimationAttributes::GetPlaybackMode() const ...@@ -506,7 +511,7 @@ AnimationAttributes::GetPlaybackMode() const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -517,10 +522,10 @@ AnimationAttributes::GetFieldName(int index) const ...@@ -517,10 +522,10 @@ AnimationAttributes::GetFieldName(int index) const
{ {
switch (index) switch (index)
{ {
case 0: return "pipelineCachingMode"; case ID_pipelineCachingMode: return "pipelineCachingMode";
case 1: return "timeout"; case ID_timeout: return "timeout";
case 2: return "playbackMode"; case ID_playbackMode: return "playbackMode";
default: return "invalid index"; default: return "invalid index";
} }
} }
...@@ -533,7 +538,7 @@ AnimationAttributes::GetFieldName(int index) const ...@@ -533,7 +538,7 @@ AnimationAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -544,10 +549,10 @@ AnimationAttributes::GetFieldType(int index) const ...@@ -544,10 +549,10 @@ AnimationAttributes::GetFieldType(int index) const
{ {
switch (index) switch (index)
{ {
case 0: return FieldType_bool; case ID_pipelineCachingMode: return FieldType_bool;
case 1: return FieldType_int; case ID_timeout: return FieldType_int;
case 2: return FieldType_enum; case ID_playbackMode: return FieldType_enum;
default: return FieldType_unknown; default: return FieldType_unknown;
} }
} }
...@@ -560,7 +565,7 @@ AnimationAttributes::GetFieldType(int index) const ...@@ -560,7 +565,7 @@ AnimationAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -571,10 +576,10 @@ AnimationAttributes::GetFieldTypeName(int index) const ...@@ -571,10 +576,10 @@ AnimationAttributes::GetFieldTypeName(int index) const
{ {
switch (index) switch (index)
{ {
case 0: return "bool"; case ID_pipelineCachingMode: return "bool";
case 1: return "int"; case ID_timeout: return "int";
case 2: return "enum"; case ID_playbackMode: return "enum";
default: return "invalid index"; default: return "invalid index";
} }
} }
...@@ -587,7 +592,7 @@ AnimationAttributes::GetFieldTypeName(int index) const ...@@ -587,7 +592,7 @@ AnimationAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -600,17 +605,17 @@ AnimationAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const ...@@ -600,17 +605,17 @@ AnimationAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
bool retval = false; bool retval = false;
switch (index_) switch (index_)
{ {
case 0: case ID_pipelineCachingMode:
{ // new scope { // new scope
retval = (pipelineCachingMode == obj.pipelineCachingMode); retval = (pipelineCachingMode == obj.pipelineCachingMode);
} }
break; break;
case 1: case ID_timeout:
{ // new scope { // new scope
retval = (timeout == obj.timeout); retval = (timeout == obj.timeout);
} }
break; break;
case 2: case ID_playbackMode:
{ // new scope { // new scope
retval = (playbackMode == obj.playbackMode); retval = (playbackMode == obj.playbackMode);
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
// Notes: Autogenerated by xml2atts. // Notes: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Thu Jan 13 08:12:06 PDT 2005 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -111,10 +111,21 @@ public: ...@@ -111,10 +111,21 @@ public:
// User-defined methods // User-defined methods
virtual void ProcessOldVersions(DataNode *parentNode, const char *configVersion); virtual void ProcessOldVersions(DataNode *parentNode, const char *configVersion);
// IDs that can be used to identify fields in case statements
enum {
ID_pipelineCachingMode = 0,
ID_timeout,
ID_playbackMode
};
private: private:
bool pipelineCachingMode; bool pipelineCachingMode;
int timeout; int timeout;
int playbackMode; int playbackMode;
// Static class format string for type map.
static const char *TypeMapFormatString;
}; };
#endif #endif
This diff is collapsed.
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
// Notes: Autogenerated by xml2atts. // Notes: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Mon Nov 19 11:34:12 PDT 2007 // Creation: Thu Dec 20 09:40:32 PDT 2007
// //
// Modifications: // Modifications:
// //
...@@ -398,6 +398,110 @@ public: ...@@ -398,6 +398,110 @@ public: