master
Richard Linden 2013-08-12 20:07:41 -07:00
commit b8d49dab9a
635 changed files with 7540 additions and 8052 deletions

View File

@ -319,14 +319,14 @@ void LLAvatarAppearance::initClass()
BOOL success = sXMLTree.parseFile( xmlFile, FALSE );
if (!success)
{
llerrs << "Problem reading avatar configuration file:" << xmlFile << LL_ENDL;
LL_ERRS() << "Problem reading avatar configuration file:" << xmlFile << LL_ENDL;
}
// now sanity check xml file
LLXmlTreeNode* root = sXMLTree.getRoot();
if (!root)
{
llerrs << "No root node found in avatar configuration file: " << xmlFile << LL_ENDL;
LL_ERRS() << "No root node found in avatar configuration file: " << xmlFile << LL_ENDL;
return;
}
@ -335,14 +335,14 @@ void LLAvatarAppearance::initClass()
//-------------------------------------------------------------------------
if( !root->hasName( "linden_avatar" ) )
{
llerrs << "Invalid avatar file header: " << xmlFile << LL_ENDL;
LL_ERRS() << "Invalid avatar file header: " << xmlFile << LL_ENDL;
}
std::string version;
static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
llerrs << "Invalid avatar file version: " << version << " in file: " << xmlFile << LL_ENDL;
LL_ERRS() << "Invalid avatar file version: " << version << " in file: " << xmlFile << LL_ENDL;
}
S32 wearable_def_version = 1;
@ -355,7 +355,7 @@ void LLAvatarAppearance::initClass()
LLXmlTreeNode* skeleton_node = root->getChildByName( "skeleton" );
if (!skeleton_node)
{
llerrs << "No skeleton in avatar configuration file: " << xmlFile << LL_ENDL;
LL_ERRS() << "No skeleton in avatar configuration file: " << xmlFile << LL_ENDL;
return;
}
@ -363,14 +363,14 @@ void LLAvatarAppearance::initClass()
static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name");
if (!skeleton_node->getFastAttributeString(file_name_string, skeleton_file_name))
{
llerrs << "No file name in skeleton node in avatar config file: " << xmlFile << LL_ENDL;
LL_ERRS() << "No file name in skeleton node in avatar config file: " << xmlFile << LL_ENDL;
}
std::string skeleton_path;
skeleton_path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,skeleton_file_name);
if (!parseSkeletonFile(skeleton_path))
{
llerrs << "Error parsing skeleton file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton file: " << skeleton_path << LL_ENDL;
}
// Process XML data
@ -383,7 +383,7 @@ void LLAvatarAppearance::initClass()
sAvatarSkeletonInfo = new LLAvatarSkeletonInfo;
if (!sAvatarSkeletonInfo->parseXml(sSkeletonXMLTree.getRoot()))
{
llerrs << "Error parsing skeleton XML file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton XML file: " << skeleton_path << LL_ENDL;
}
// parse avatar_lad.xml
if (sAvatarXmlInfo)
@ -393,27 +393,27 @@ void LLAvatarAppearance::initClass()
sAvatarXmlInfo = new LLAvatarXmlInfo;
if (!sAvatarXmlInfo->parseXmlSkeletonNode(root))
{
llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlMeshNodes(root))
{
llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlColorNodes(root))
{
llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlLayerNodes(root))
{
llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlDriverNodes(root))
{
llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlMorphNodes(root))
{
llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
}
@ -526,7 +526,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
if (!parsesuccess)
{
llerrs << "Can't parse skeleton file: " << filename << LL_ENDL;
LL_ERRS() << "Can't parse skeleton file: " << filename << LL_ENDL;
return FALSE;
}
@ -534,13 +534,13 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
LLXmlTreeNode* root = sSkeletonXMLTree.getRoot();
if (!root)
{
llerrs << "No root node found in avatar skeleton file: " << filename << LL_ENDL;
LL_ERRS() << "No root node found in avatar skeleton file: " << filename << LL_ENDL;
return FALSE;
}
if( !root->hasName( "linden_skeleton" ) )
{
llerrs << "Invalid avatar skeleton file header: " << filename << LL_ENDL;
LL_ERRS() << "Invalid avatar skeleton file header: " << filename << LL_ENDL;
return FALSE;
}
@ -548,7 +548,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL;
LL_ERRS() << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL;
return FALSE;
}
@ -567,7 +567,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
joint = getCharacterJoint(joint_num);
if (!joint)
{
llwarns << "Too many bones" << LL_ENDL;
LL_WARNS() << "Too many bones" << LL_ENDL;
return FALSE;
}
joint->setName( info->mName );
@ -576,7 +576,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
{
if (volume_num >= (S32)mNumCollisionVolumes)
{
llwarns << "Too many bones" << LL_ENDL;
LL_WARNS() << "Too many bones" << LL_ENDL;
return FALSE;
}
joint = (&mCollisionVolumes[volume_num]);
@ -646,7 +646,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
//-------------------------------------------------------------------------
if (!allocateCharacterJoints(info->mNumBones))
{
llerrs << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL;
LL_ERRS() << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL;
return FALSE;
}
@ -657,7 +657,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
{
if (!allocateCollisionVolumes(info->mNumCollisionVolumes))
{
llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL;
LL_ERRS() << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL;
return FALSE;
}
}
@ -670,7 +670,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
LLAvatarBoneInfo *info = *iter;
if (!setupBone(info, NULL, current_volume_num, current_joint_num))
{
llerrs << "Error parsing bone in skeleton file" << LL_ENDL;
LL_ERRS() << "Error parsing bone in skeleton file" << LL_ENDL;
return FALSE;
}
}
@ -730,17 +730,17 @@ void LLAvatarAppearance::buildCharacter()
stop_glerror();
// gPrintMessagesThisFrame = TRUE;
lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL;
LL_DEBUGS() << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL;
if (!status)
{
if (isSelf())
{
llerrs << "Unable to load user's avatar" << LL_ENDL;
LL_ERRS() << "Unable to load user's avatar" << LL_ENDL;
}
else
{
llwarns << "Unable to load other's avatar" << LL_ENDL;
LL_WARNS() << "Unable to load other's avatar" << LL_ENDL;
}
return;
}
@ -789,7 +789,7 @@ void LLAvatarAppearance::buildCharacter()
mEyeLeftp &&
mEyeRightp))
{
llerrs << "Failed to create avatar." << LL_ENDL;
LL_ERRS() << "Failed to create avatar." << LL_ENDL;
return;
}
@ -810,21 +810,21 @@ BOOL LLAvatarAppearance::loadAvatar()
// avatar_skeleton.xml
if( !buildSkeleton(sAvatarSkeletonInfo) )
{
llwarns << "avatar file: buildSkeleton() failed" << LL_ENDL;
LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml : <skeleton>
if( !loadSkeletonNode() )
{
llwarns << "avatar file: loadNodeSkeleton() failed" << LL_ENDL;
LL_WARNS() << "avatar file: loadNodeSkeleton() failed" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml : <mesh>
if( !loadMeshNodes() )
{
llwarns << "avatar file: loadNodeMesh() failed" << LL_ENDL;
LL_WARNS() << "avatar file: loadNodeMesh() failed" << LL_ENDL;
return FALSE;
}
@ -834,13 +834,13 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexSkinColor = new LLTexGlobalColor( this );
if( !mTexSkinColor->setInfo( sAvatarXmlInfo->mTexSkinColorInfo ) )
{
llwarns << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL;
LL_WARNS() << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
llwarns << "<global_color> name=\"skin_color\" not found" << LL_ENDL;
LL_WARNS() << "<global_color> name=\"skin_color\" not found" << LL_ENDL;
return FALSE;
}
if( sAvatarXmlInfo->mTexHairColorInfo )
@ -848,13 +848,13 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexHairColor = new LLTexGlobalColor( this );
if( !mTexHairColor->setInfo( sAvatarXmlInfo->mTexHairColorInfo ) )
{
llwarns << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL;
LL_WARNS() << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
llwarns << "<global_color> name=\"hair_color\" not found" << LL_ENDL;
LL_WARNS() << "<global_color> name=\"hair_color\" not found" << LL_ENDL;
return FALSE;
}
if( sAvatarXmlInfo->mTexEyeColorInfo )
@ -862,26 +862,26 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexEyeColor = new LLTexGlobalColor( this );
if( !mTexEyeColor->setInfo( sAvatarXmlInfo->mTexEyeColorInfo ) )
{
llwarns << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL;
LL_WARNS() << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
llwarns << "<global_color> name=\"eye_color\" not found" << LL_ENDL;
LL_WARNS() << "<global_color> name=\"eye_color\" not found" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml : <layer_set>
if (sAvatarXmlInfo->mLayerInfoList.empty())
{
llwarns << "avatar file: missing <layer_set> node" << LL_ENDL;
LL_WARNS() << "avatar file: missing <layer_set> node" << LL_ENDL;
return FALSE;
}
if (sAvatarXmlInfo->mMorphMaskInfoList.empty())
{
llwarns << "avatar file: missing <morph_masks> node" << LL_ENDL;
LL_WARNS() << "avatar file: missing <morph_masks> node" << LL_ENDL;
return FALSE;
}
@ -923,14 +923,14 @@ BOOL LLAvatarAppearance::loadAvatar()
LLVisualParam*(LLAvatarAppearance::*avatar_function)(S32)const = &LLAvatarAppearance::getVisualParam;
if( !driver_param->linkDrivenParams(boost::bind(avatar_function,(LLAvatarAppearance*)this,_1 ), false))
{
llwarns << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL;
LL_WARNS() << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL;
continue;
}
}
else
{
delete driver_param;
llwarns << "avatar file: driver_param->parseData() failed" << LL_ENDL;
LL_WARNS() << "avatar file: driver_param->parseData() failed" << LL_ENDL;
return FALSE;
}
}
@ -1050,17 +1050,17 @@ BOOL LLAvatarAppearance::loadMeshNodes()
}
else
{
llwarns << "Avatar file: <mesh> has invalid lod setting " << lod << LL_ENDL;
LL_WARNS() << "Avatar file: <mesh> has invalid lod setting " << lod << LL_ENDL;
return FALSE;
}
}
else
{
llwarns << "Ignoring unrecognized mesh type: " << type << LL_ENDL;
LL_WARNS() << "Ignoring unrecognized mesh type: " << type << LL_ENDL;
return FALSE;
}
// llinfos << "Parsing mesh data for " << type << "..." << LL_ENDL;
// LL_INFOS() << "Parsing mesh data for " << type << "..." << LL_ENDL;
// If this isn't set to white (1.0), avatars will *ALWAYS* be darker than their surroundings.
// Do not touch!!!
@ -1090,7 +1090,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
if( !poly_mesh )
{
llwarns << "Failed to load mesh of type " << type << LL_ENDL;
LL_WARNS() << "Failed to load mesh of type " << type << LL_ENDL;
return FALSE;
}
@ -1150,7 +1150,7 @@ BOOL LLAvatarAppearance::loadLayersets()
{
stop_glerror();
delete layer_set;
llwarns << "avatar file: layer_set->setInfo() failed" << LL_ENDL;
LL_WARNS() << "avatar file: layer_set->setInfo() failed" << LL_ENDL;
return FALSE;
}
@ -1173,7 +1173,7 @@ BOOL LLAvatarAppearance::loadLayersets()
// if no baked texture was found, warn and cleanup
if (baked_index == BAKED_NUM_INDICES)
{
llwarns << "<layer_set> has invalid body_region attribute" << LL_ENDL;
LL_WARNS() << "<layer_set> has invalid body_region attribute" << LL_ENDL;
delete layer_set;
return FALSE;
}
@ -1191,7 +1191,7 @@ BOOL LLAvatarAppearance::loadLayersets()
}
else
{
llwarns << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL;
LL_WARNS() << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL;
success = FALSE;
}
}
@ -1287,7 +1287,7 @@ BOOL LLAvatarAppearance::isValid() const
// This should only be called on ourself.
if (!isSelf())
{
llerrs << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL;
LL_ERRS() << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL;
}
return TRUE;
}
@ -1476,7 +1476,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
llwarns << "Bone without name" << LL_ENDL;
LL_WARNS() << "Bone without name" << LL_ENDL;
return FALSE;
}
}
@ -1491,28 +1491,28 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
}
else
{
llwarns << "Invalid node " << node->getName() << LL_ENDL;
LL_WARNS() << "Invalid node " << node->getName() << LL_ENDL;
return FALSE;
}
static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos");
if (!node->getFastAttributeVector3(pos_string, mPos))
{
llwarns << "Bone without position" << LL_ENDL;
LL_WARNS() << "Bone without position" << LL_ENDL;
return FALSE;
}
static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot");
if (!node->getFastAttributeVector3(rot_string, mRot))
{
llwarns << "Bone without rotation" << LL_ENDL;
LL_WARNS() << "Bone without rotation" << LL_ENDL;
return FALSE;
}
static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale");
if (!node->getFastAttributeVector3(scale_string, mScale))
{
llwarns << "Bone without scale" << LL_ENDL;
LL_WARNS() << "Bone without scale" << LL_ENDL;
return FALSE;
}
@ -1521,7 +1521,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle pivot_string = LLXmlTree::addAttributeString("pivot");
if (!node->getFastAttributeVector3(pivot_string, mPivot))
{
llwarns << "Bone without pivot" << LL_ENDL;
LL_WARNS() << "Bone without pivot" << LL_ENDL;
return FALSE;
}
}
@ -1549,7 +1549,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones");
if (!node->getFastAttributeS32(num_bones_string, mNumBones))
{
llwarns << "Couldn't find number of bones." << LL_ENDL;
LL_WARNS() << "Couldn't find number of bones." << LL_ENDL;
return FALSE;
}
@ -1563,7 +1563,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
if (!info->parseXml(child))
{
delete info;
llwarns << "Error parsing bone in skeleton file" << LL_ENDL;
LL_WARNS() << "Error parsing bone in skeleton file" << LL_ENDL;
return FALSE;
}
mBoneInfoList.push_back(info);
@ -1580,7 +1580,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
LLXmlTreeNode* node = root->getChildByName( "skeleton" );
if( !node )
{
llwarns << "avatar file: missing <skeleton>" << LL_ENDL;
LL_WARNS() << "avatar file: missing <skeleton>" << LL_ENDL;
return FALSE;
}
@ -1595,11 +1595,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
{
if (child->getChildByName("param_morph"))
{
llwarns << "Can't specify morph param in skeleton definition." << LL_ENDL;
LL_WARNS() << "Can't specify morph param in skeleton definition." << LL_ENDL;
}
else
{
llwarns << "Unknown param type." << LL_ENDL;
LL_WARNS() << "Unknown param type." << LL_ENDL;
}
continue;
}
@ -1624,7 +1624,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!child->getFastAttributeString(name_string, info->mName))
{
llwarns << "No name supplied for attachment point." << LL_ENDL;
LL_WARNS() << "No name supplied for attachment point." << LL_ENDL;
delete info;
continue;
}
@ -1632,7 +1632,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle joint_string = LLXmlTree::addAttributeString("joint");
if (!child->getFastAttributeString(joint_string, info->mJointName))
{
llwarns << "No bone declared in attachment point " << info->mName << LL_ENDL;
LL_WARNS() << "No bone declared in attachment point " << info->mName << LL_ENDL;
delete info;
continue;
}
@ -1658,7 +1658,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle id_string = LLXmlTree::addAttributeString("id");
if (!child->getFastAttributeS32(id_string, info->mAttachmentID))
{
llwarns << "No id supplied for attachment point " << info->mName << LL_ENDL;
LL_WARNS() << "No id supplied for attachment point " << info->mName << LL_ENDL;
delete info;
continue;
}
@ -1693,7 +1693,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle type_string = LLXmlTree::addAttributeString("type");
if( !node->getFastAttributeString( type_string, info->mType ) )
{
llwarns << "Avatar file: <mesh> is missing type attribute. Ignoring element. " << LL_ENDL;
LL_WARNS() << "Avatar file: <mesh> is missing type attribute. Ignoring element. " << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@ -1701,7 +1701,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle lod_string = LLXmlTree::addAttributeString("lod");
if (!node->getFastAttributeS32( lod_string, info->mLOD ))
{
llwarns << "Avatar file: <mesh> is missing lod attribute. Ignoring element. " << LL_ENDL;
LL_WARNS() << "Avatar file: <mesh> is missing lod attribute. Ignoring element. " << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@ -1709,7 +1709,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name");
if( !node->getFastAttributeString( file_name_string, info->mMeshFileName ) )
{
llwarns << "Avatar file: <mesh> is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL;
LL_WARNS() << "Avatar file: <mesh> is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@ -1740,11 +1740,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
if (child->getChildByName("param_skeleton"))
{
llwarns << "Can't specify skeleton param in a mesh definition." << LL_ENDL;
LL_WARNS() << "Can't specify skeleton param in a mesh definition." << LL_ENDL;
}
else
{
llwarns << "Unknown param type." << LL_ENDL;
LL_WARNS() << "Unknown param type." << LL_ENDL;
}
continue;
}
@ -1785,14 +1785,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexSkinColorInfo)
{
llwarns << "avatar file: multiple instances of skin_color" << LL_ENDL;
LL_WARNS() << "avatar file: multiple instances of skin_color" << LL_ENDL;
return FALSE;
}
mTexSkinColorInfo = new LLTexGlobalColorInfo;
if( !mTexSkinColorInfo->parseXml( color_node ) )
{
delete_and_clear(mTexSkinColorInfo);
llwarns << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL;
LL_WARNS() << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@ -1800,14 +1800,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexHairColorInfo)
{
llwarns << "avatar file: multiple instances of hair_color" << LL_ENDL;
LL_WARNS() << "avatar file: multiple instances of hair_color" << LL_ENDL;
return FALSE;
}
mTexHairColorInfo = new LLTexGlobalColorInfo;
if( !mTexHairColorInfo->parseXml( color_node ) )
{
delete_and_clear(mTexHairColorInfo);
llwarns << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL;
LL_WARNS() << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@ -1815,13 +1815,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexEyeColorInfo)
{
llwarns << "avatar file: multiple instances of eye_color" << LL_ENDL;
LL_WARNS() << "avatar file: multiple instances of eye_color" << LL_ENDL;
return FALSE;
}
mTexEyeColorInfo = new LLTexGlobalColorInfo;
if( !mTexEyeColorInfo->parseXml( color_node ) )
{
llwarns << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL;
LL_WARNS() << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@ -1847,7 +1847,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root
else
{
delete layer_info;
llwarns << "avatar file: layer_set->parseXml() failed" << LL_ENDL;
LL_WARNS() << "avatar file: layer_set->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@ -1876,7 +1876,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* roo
else
{
delete driver_info;
llwarns << "avatar file: driver_param->parseXml() failed" << LL_ENDL;
LL_WARNS() << "avatar file: driver_param->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@ -1905,7 +1905,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("morph_name");
if (!grand_child->getFastAttributeString(name_string, info->mName))
{
llwarns << "No name supplied for morph mask." << LL_ENDL;
LL_WARNS() << "No name supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
@ -1913,7 +1913,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle region_string = LLXmlTree::addAttributeString("body_region");
if (!grand_child->getFastAttributeString(region_string, info->mRegion))
{
llwarns << "No region supplied for morph mask." << LL_ENDL;
LL_WARNS() << "No region supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
@ -1921,7 +1921,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle layer_string = LLXmlTree::addAttributeString("layer");
if (!grand_child->getFastAttributeString(layer_string, info->mLayer))
{
llwarns << "No layer supplied for morph mask." << LL_ENDL;
LL_WARNS() << "No layer supplied for morph mask." << LL_ENDL;
delete info;
continue;
}

View File

@ -238,7 +238,7 @@ LLAvatarJointCollisionVolume::LLAvatarJointCollisionVolume()
/*virtual*/
U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
{
llerrs << "Cannot call render() on LLAvatarJointCollisionVolume" << llendl;
LL_ERRS() << "Cannot call render() on LLAvatarJointCollisionVolume" << LL_ENDL;
return 0;
}

View File

@ -88,7 +88,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
mJoint = joint;
if ( !mJoint )
{
llinfos << "Can't find joint" << llendl;
LL_INFOS() << "Can't find joint" << LL_ENDL;
}
// compute the inverse root skin matrix
@ -304,7 +304,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
U32 jn;
for (jn = 0; jn < numJointNames; jn++)
{
//llinfos << "Setting up joint " << jointNames[jn] << llendl;
//LL_INFOS() << "Setting up joint " << jointNames[jn] << LL_ENDL;
LLAvatarJoint* joint = (LLAvatarJoint*)(getRoot()->findJoint(jointNames[jn]) );
mSkinJoints[jn].setupSkinJoint( joint );
}

View File

@ -89,7 +89,7 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node)
}
else
{
llerrs << "<driven> Unable to resolve driven parameter: " << driven_id << llendl;
LL_ERRS() << "<driven> Unable to resolve driven parameter: " << driven_id << LL_ENDL;
return FALSE;
}
}
@ -139,9 +139,9 @@ void LLDriverParamInfo::toStream(std::ostream &out)
}
else
{
llwarns << "could not get parameter " << driven.mDrivenID << " from avatar "
LL_WARNS() << "could not get parameter " << driven.mDrivenID << " from avatar "
<< mDriverParam->getAvatarAppearance()
<< " for driver parameter " << getID() << llendl;
<< " for driver parameter " << getID() << LL_ENDL;
}
out << std::endl;
}

View File

@ -64,7 +64,7 @@ LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject& lto) :
LLTexLayer* original_layer = lto.getTexLayer(index);
if (!original_layer)
{
llerrs << "could not clone Local Texture Object: unable to extract texlayer!" << llendl;
LL_ERRS() << "could not clone Local Texture Object: unable to extract texlayer!" << LL_ENDL;
continue;
}

View File

@ -277,13 +277,13 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
//-------------------------------------------------------------------------
if(fileName.empty())
{
llerrs << "Filename is Empty!" << llendl;
LL_ERRS() << "Filename is Empty!" << LL_ENDL;
return FALSE;
}
LLFILE* fp = LLFile::fopen(fileName, "rb"); /*Flawfinder: ignore*/
if (!fp)
{
llerrs << "can't open: " << fileName << llendl;
LL_ERRS() << "can't open: " << fileName << LL_ENDL;
return FALSE;
}
@ -293,7 +293,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
char header[128]; /*Flawfinder: ignore*/
if (fread(header, sizeof(char), 128, fp) != 128)
{
llwarns << "Short read" << llendl;
LL_WARNS() << "Short read" << LL_ENDL;
}
//-------------------------------------------------------------------------
@ -302,7 +302,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
BOOL status = FALSE;
if ( strncmp(header, HEADER_BINARY, strlen(HEADER_BINARY)) == 0 ) /*Flawfinder: ignore*/
{
lldebugs << "Loading " << fileName << llendl;
LL_DEBUGS() << "Loading " << fileName << LL_ENDL;
//----------------------------------------------------------------
// File Header (seek past it)
@ -316,7 +316,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
size_t numRead = fread(&hasWeights, sizeof(U8), 1, fp);
if (numRead != 1)
{
llerrs << "can't read HasWeights flag from " << fileName << llendl;
LL_ERRS() << "can't read HasWeights flag from " << fileName << LL_ENDL;
return FALSE;
}
if (!isLOD())
@ -331,7 +331,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
numRead = fread(&hasDetailTexCoords, sizeof(U8), 1, fp);
if (numRead != 1)
{
llerrs << "can't read HasDetailTexCoords flag from " << fileName << llendl;
LL_ERRS() << "can't read HasDetailTexCoords flag from " << fileName << LL_ENDL;
return FALSE;
}
@ -343,7 +343,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(position.mV, sizeof(float), 3);
if (numRead != 3)
{
llerrs << "can't read Position from " << fileName << llendl;
LL_ERRS() << "can't read Position from " << fileName << LL_ENDL;
return FALSE;
}
setPosition( position );
@ -356,7 +356,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(rotationAngles.mV, sizeof(float), 3);
if (numRead != 3)
{
llerrs << "can't read RotationAngles from " << fileName << llendl;
LL_ERRS() << "can't read RotationAngles from " << fileName << LL_ENDL;
return FALSE;
}
@ -365,7 +365,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
llerrs << "can't read RotationOrder from " << fileName << llendl;
LL_ERRS() << "can't read RotationOrder from " << fileName << LL_ENDL;
return FALSE;
}
@ -384,7 +384,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(scale.mV, sizeof(float), 3);
if (numRead != 3)
{
llerrs << "can't read Scale from " << fileName << llendl;
LL_ERRS() << "can't read Scale from " << fileName << LL_ENDL;
return FALSE;
}
setScale( scale );
@ -405,7 +405,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&numVertices, sizeof(U16), 1);
if (numRead != 1)
{
llerrs << "can't read NumVertices from " << fileName << llendl;
LL_ERRS() << "can't read NumVertices from " << fileName << LL_ENDL;
return FALSE;
}
@ -420,7 +420,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&mBaseCoords[i], sizeof(float), 3);
if (numRead != 3)
{
llerrs << "can't read Coordinates from " << fileName << llendl;
LL_ERRS() << "can't read Coordinates from " << fileName << LL_ENDL;
return FALSE;
}
}
@ -434,7 +434,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&mBaseNormals[i], sizeof(float), 3);
if (numRead != 3)
{
llerrs << " can't read Normals from " << fileName << llendl;
LL_ERRS() << " can't read Normals from " << fileName << LL_ENDL;
return FALSE;
}
}
@ -448,7 +448,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&mBaseBinormals[i], sizeof(float), 3);
if (numRead != 3)
{
llerrs << " can't read Binormals from " << fileName << llendl;
LL_ERRS() << " can't read Binormals from " << fileName << LL_ENDL;
return FALSE;
}
}
@ -460,7 +460,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(mTexCoords, sizeof(float), 2*numVertices);
if (numRead != numVertices)
{
llerrs << "can't read TexCoords from " << fileName << llendl;
LL_ERRS() << "can't read TexCoords from " << fileName << LL_ENDL;
return FALSE;
}
@ -473,7 +473,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(mDetailTexCoords, sizeof(float), 2*numVertices);
if (numRead != numVertices)
{
llerrs << "can't read DetailTexCoords from " << fileName << llendl;
LL_ERRS() << "can't read DetailTexCoords from " << fileName << LL_ENDL;
return FALSE;
}
}
@ -487,7 +487,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(mWeights, sizeof(float), numVertices);
if (numRead != numVertices)
{
llerrs << "can't read Weights from " << fileName << llendl;
LL_ERRS() << "can't read Weights from " << fileName << LL_ENDL;
return FALSE;
}
}
@ -501,7 +501,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&numFaces, sizeof(U16), 1);
if (numRead != 1)
{
llerrs << "can't read NumFaces from " << fileName << llendl;
LL_ERRS() << "can't read NumFaces from " << fileName << LL_ENDL;
return FALSE;
}
allocateFaceData( numFaces );
@ -519,7 +519,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(face, sizeof(U16), 3);
if (numRead != 3)
{
llerrs << "can't read Face[" << i << "] from " << fileName << llendl;
LL_ERRS() << "can't read Face[" << i << "] from " << fileName << LL_ENDL;
return FALSE;
}
if (mReferenceData)
@ -559,10 +559,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
numTris++;
}
lldebugs << "verts: " << numVertices
LL_DEBUGS() << "verts: " << numVertices
<< ", faces: " << numFaces
<< ", tris: " << numTris
<< llendl;
<< LL_ENDL;
//----------------------------------------------------------------
// NumSkinJoints
@ -576,7 +576,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&numSkinJoints, sizeof(U16), 1);
if (numRead != 1)
{
llerrs << "can't read NumSkinJoints from " << fileName << llendl;
LL_ERRS() << "can't read NumSkinJoints from " << fileName << LL_ENDL;
return FALSE;
}
allocateJointNames( numSkinJoints );
@ -592,7 +592,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
jointName[sizeof(jointName)-1] = '\0'; // ensure nul-termination
if (numRead != 1)
{
llerrs << "can't read Skin[" << i << "].Name from " << fileName << llendl;
LL_ERRS() << "can't read Skin[" << i << "].Name from " << fileName << LL_ENDL;
return FALSE;
}
@ -687,12 +687,12 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
S32 remapDst;
if (fread(&remapSrc, sizeof(S32), 1, fp) != 1)
{
llerrs << "can't read source vertex in vertex remap data" << llendl;
LL_ERRS() << "can't read source vertex in vertex remap data" << LL_ENDL;
break;
}
if (fread(&remapDst, sizeof(S32), 1, fp) != 1)
{
llerrs << "can't read destination vertex in vertex remap data" << llendl;
LL_ERRS() << "can't read destination vertex in vertex remap data" << LL_ENDL;
break;
}
llendianswizzle(&remapSrc, sizeof(S32), 1);
@ -707,7 +707,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
}
else
{
llerrs << "invalid mesh file header: " << fileName << llendl;
LL_ERRS() << "invalid mesh file header: " << fileName << LL_ENDL;
status = FALSE;
}
@ -824,7 +824,7 @@ LLPolyMesh *LLPolyMesh::getMesh(const std::string &name, LLPolyMesh* reference_m
LLPolyMeshSharedData* meshSharedData = get_if_there(sGlobalSharedMeshList, name, (LLPolyMeshSharedData*)NULL);
if (meshSharedData)
{
// llinfos << "Polymesh " << name << " found in global mesh table." << llendl;
// LL_INFOS() << "Polymesh " << name << " found in global mesh table." << LL_ENDL;
LLPolyMesh *poly_mesh = new LLPolyMesh(meshSharedData, reference_mesh);
return poly_mesh;
}
@ -848,7 +848,7 @@ LLPolyMesh *LLPolyMesh::getMesh(const std::string &name, LLPolyMesh* reference_m
LLPolyMesh *poly_mesh = new LLPolyMesh(mesh_data, reference_mesh);
// llinfos << "Polymesh " << name << " added to global mesh table." << llendl;
// LL_INFOS() << "Polymesh " << name << " added to global mesh table." << LL_ENDL;
sGlobalSharedMeshList[name] = poly_mesh->mSharedData;
return poly_mesh;
@ -882,10 +882,10 @@ void LLPolyMesh::dumpDiagInfo()
std::string buf;
llinfos << "-----------------------------------------------------" << llendl;
llinfos << " Global PolyMesh Table (DEBUG only)" << llendl;
llinfos << " Verts Faces Mem(KB) Name" << llendl;
llinfos << "-----------------------------------------------------" << llendl;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
LL_INFOS() << " Global PolyMesh Table (DEBUG only)" << LL_ENDL;
LL_INFOS() << " Verts Faces Mem(KB) Name" << LL_ENDL;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
// print each loaded mesh, and it's memory usage
for(LLPolyMeshSharedDataTable::iterator iter = sGlobalSharedMeshList.begin();
@ -899,17 +899,17 @@ void LLPolyMesh::dumpDiagInfo()
U32 num_kb = mesh->getNumKB();
buf = llformat("%8d %8d %8d %s", num_verts, num_faces, num_kb, mesh_name.c_str());
llinfos << buf << llendl;
LL_INFOS() << buf << LL_ENDL;
total_verts += num_verts;
total_faces += num_faces;
total_kb += num_kb;
}
llinfos << "-----------------------------------------------------" << llendl;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
buf = llformat("%8d %8d %8d TOTAL", total_verts, total_faces, total_kb );
llinfos << buf << llendl;
llinfos << "-----------------------------------------------------" << llendl;
LL_INFOS() << buf << LL_ENDL;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
}
//-----------------------------------------------------------------------------

View File

@ -113,7 +113,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&numVertices, sizeof(S32), 1);
if (numRead != 1)
{
llwarns << "Can't read number of morph target vertices" << llendl;
LL_WARNS() << "Can't read number of morph target vertices" << LL_ENDL;
return FALSE;
}
@ -150,13 +150,13 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mVertexIndices[v], sizeof(U32), 1);
if (numRead != 1)
{
llwarns << "Can't read morph target vertex number" << llendl;
LL_WARNS() << "Can't read morph target vertex number" << LL_ENDL;
return FALSE;
}
if (mVertexIndices[v] > 10000)
{
llerrs << "Bad morph index: " << mVertexIndices[v] << llendl;
LL_ERRS() << "Bad morph index: " << mVertexIndices[v] << LL_ENDL;
}
@ -164,7 +164,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mCoords[v], sizeof(F32), 3);
if (numRead != 3)
{
llwarns << "Can't read morph target vertex coordinates" << llendl;
LL_WARNS() << "Can't read morph target vertex coordinates" << LL_ENDL;
return FALSE;
}
@ -184,7 +184,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mNormals[v], sizeof(F32), 3);
if (numRead != 3)
{
llwarns << "Can't read morph target normal" << llendl;
LL_WARNS() << "Can't read morph target normal" << LL_ENDL;
return FALSE;
}
@ -192,7 +192,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mBinormals[v], sizeof(F32), 3);
if (numRead != 3)
{
llwarns << "Can't read morph target binormal" << llendl;
LL_WARNS() << "Can't read morph target binormal" << LL_ENDL;
return FALSE;
}
@ -201,7 +201,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mTexCoords[v].mV, sizeof(F32), 2);
if (numRead != 2)
{
llwarns << "Can't read morph target uv" << llendl;
LL_WARNS() << "Can't read morph target uv" << LL_ENDL;
return FALSE;
}
@ -269,7 +269,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if( !node->getFastAttributeString( name_string, mMorphName ) )
{
llwarns << "Avatar file: <param> is missing name attribute" << llendl;
LL_WARNS() << "Avatar file: <param> is missing name attribute" << LL_ENDL;
return FALSE; // Continue, ignoring this tag
}
@ -280,8 +280,8 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
if (NULL == paramNode)
{
llwarns << "Failed to getChildByName(\"param_morph\")"
<< llendl;
LL_WARNS() << "Failed to getChildByName(\"param_morph\")"
<< LL_ENDL;
return FALSE;
}
@ -377,7 +377,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
}
if (!mMorphData)
{
llwarns << "No morph target named " << morph_param_name << " found in mesh." << llendl;
LL_WARNS() << "No morph target named " << morph_param_name << " found in mesh." << LL_ENDL;
return FALSE; // Continue, ignoring this tag
}
return TRUE;

View File

@ -55,8 +55,8 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
if (NULL == skeletalParam)
{
llwarns << "Failed to getChildByName(\"param_skeleton\")"
<< llendl;
LL_WARNS() << "Failed to getChildByName(\"param_skeleton\")"
<< LL_ENDL;
return FALSE;
}
@ -72,14 +72,14 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!bone->getFastAttributeString(name_string, name))
{
llwarns << "No bone name specified for skeletal param." << llendl;
LL_WARNS() << "No bone name specified for skeletal param." << LL_ENDL;
continue;
}
static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale");
if (!bone->getFastAttributeVector3(scale_string, scale))
{
llwarns << "No scale specified for bone " << name << "." << llendl;
LL_WARNS() << "No scale specified for bone " << name << "." << LL_ENDL;
continue;
}
@ -93,7 +93,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
}
else
{
llwarns << "Unrecognized element " << bone->getName() << " in skeletal distortion" << llendl;
LL_WARNS() << "Unrecognized element " << bone->getName() << " in skeletal distortion" << LL_ENDL;
continue;
}
}
@ -132,13 +132,13 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
LLJoint* joint = mAvatar->getJoint(bone_info->mBoneName);
if (!joint)
{
llwarns << "Joint " << bone_info->mBoneName << " not found." << llendl;
LL_WARNS() << "Joint " << bone_info->mBoneName << " not found." << LL_ENDL;
continue;
}
if (mJointScales.find(joint) != mJointScales.end())
{
llwarns << "Scale deformation already supplied for joint " << joint->getName() << "." << llendl;
LL_WARNS() << "Scale deformation already supplied for joint " << joint->getName() << "." << LL_ENDL;
}
// store it
@ -161,7 +161,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
{
if (mJointOffsets.find(joint) != mJointOffsets.end())
{
llwarns << "Offset deformation already supplied for joint " << joint->getName() << "." << llendl;
LL_WARNS() << "Offset deformation already supplied for joint " << joint->getName() << "." << LL_ENDL;
}
mJointOffsets[joint] = bone_info->mPositionDeformation;
}

View File

@ -128,7 +128,7 @@ BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
llwarns << "<global_color> element is missing name attribute." << llendl;
LL_WARNS() << "<global_color> element is missing name attribute." << LL_ENDL;
return FALSE;
}
// <param> sub-element

View File

@ -210,7 +210,7 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle body_region_string = LLXmlTree::addAttributeString("body_region");
if( !node->getFastAttributeString( body_region_string, mBodyRegion ) )
{
llwarns << "<layer_set> is missing body_region attribute" << llendl;
LL_WARNS() << "<layer_set> is missing body_region attribute" << LL_ENDL;
return FALSE;
}
@ -735,13 +735,13 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
}
if (mLocalTexture == TEX_NUM_INDICES)
{
llwarns << "<texture> element has invalid local_texture attribute: " << mName << " " << local_texture_name << llendl;
LL_WARNS() << "<texture> element has invalid local_texture attribute: " << mName << " " << local_texture_name << LL_ENDL;
return FALSE;
}
}
else
{
llwarns << "<texture> element is missing a required attribute. " << mName << llendl;
LL_WARNS() << "<texture> element is missing a required attribute. " << mName << LL_ENDL;
return FALSE;
}
}
@ -804,7 +804,7 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance);
if (!param_color->setInfo(color_info, TRUE))
{
llwarns << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << llendl;
LL_WARNS() << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_color;
success = FALSE;
}
@ -818,7 +818,7 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance);
if (!param_alpha->setInfo(alpha_info, TRUE))
{
llwarns << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << llendl;
LL_WARNS() << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_alpha;
success = FALSE;
}
@ -851,7 +851,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
// Not a critical warning, but could be useful for debugging later issues. -Nyx
if (mInfo != NULL)
{
llwarns << "mInfo != NULL" << llendl;
LL_WARNS() << "mInfo != NULL" << LL_ENDL;
}
mInfo = info;
//mID = info->mID; // No ID
@ -1204,7 +1204,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
else
{
llinfos << "lto not defined or image not defined: " << getInfo()->getLocalTexture() << " lto: " << mLocalTextureObject << llendl;
LL_INFOS() << "lto not defined or image not defined: " << getInfo()->getLocalTexture() << " lto: " << mLocalTextureObject << LL_ENDL;
}
// if( mTexLayerSet->getAvatarAppearance()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl ) )
{
@ -1292,7 +1292,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
if( !success )
{
llinfos << "LLTexLayer::render() partial: " << getInfo()->mName << llendl;
LL_INFOS() << "LLTexLayer::render() partial: " << getInfo()->mName << LL_ENDL;
}
return success;
}
@ -1429,7 +1429,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
if (!force_render && !hasMorph())
{
lldebugs << "skipping renderMorphMasks for " << getUUID() << llendl;
LL_DEBUGS() << "skipping renderMorphMasks for " << getUUID() << LL_ENDL;
return;
}
LLFastTimer t(FTM_RENDER_MORPH_MASKS);
@ -1470,7 +1470,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
success &= param->render( x, y, width, height );
if (!success && !force_render)
{
lldebugs << "Failed to render param " << param->getID() << " ; skipping morph mask." << llendl;
LL_DEBUGS() << "Failed to render param " << param->getID() << " ; skipping morph mask." << LL_ENDL;
return;
}
}
@ -1512,8 +1512,8 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
else
{
llwarns << "Skipping rendering of " << getInfo()->mStaticImageFileName
<< "; expected 1 or 4 components." << llendl;
LL_WARNS() << "Skipping rendering of " << getInfo()->mStaticImageFileName
<< "; expected 1 or 4 components." << LL_ENDL;
}
}
}
@ -1892,18 +1892,18 @@ LLTexLayerStaticImageList::~LLTexLayerStaticImageList()
void LLTexLayerStaticImageList::dumpByteCount() const
{
llinfos << "Avatar Static Textures " <<
LL_INFOS() << "Avatar Static Textures " <<
"KB GL:" << (mGLBytes / 1024) <<
"KB TGA:" << (mTGABytes / 1024) << "KB" << llendl;
"KB TGA:" << (mTGABytes / 1024) << "KB" << LL_ENDL;
}
void LLTexLayerStaticImageList::deleteCachedImages()
{
if( mGLBytes || mTGABytes )
{
llinfos << "Clearing Static Textures " <<
LL_INFOS() << "Clearing Static Textures " <<
"KB GL:" << (mGLBytes / 1024) <<
"KB TGA:" << (mTGABytes / 1024) << "KB" << llendl;
"KB TGA:" << (mTGABytes / 1024) << "KB" << LL_ENDL;
//mStaticImageLists uses LLPointers, clear() will cause deletion

View File

@ -50,7 +50,7 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
else
{
llerrs << "LLTexLayerParam constructor passed with NULL reference for layer!" << llendl;
LL_ERRS() << "LLTexLayerParam constructor passed with NULL reference for layer!" << LL_ENDL;
}
}
@ -87,7 +87,7 @@ void LLTexLayerParamAlpha::dumpCacheByteCount()
{
S32 gl_bytes = 0;
getCacheByteCount( &gl_bytes);
llinfos << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << llendl;
LL_INFOS() << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << LL_ENDL;
}
// static
@ -279,7 +279,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (mStaticImageTGA.isNull())
{
llwarns << "Unable to load static file: " << info->mStaticImageFileName << llendl;
LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL;
mStaticImageInvalid = TRUE; // don't try again.
return FALSE;
}
@ -310,7 +310,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mStaticImageRaw = new LLImageRaw;
mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight);
mNeedsCreateTexture = TRUE;
lldebugs << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << llendl;
LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL;
}
if (mCachedProcessedTexture)
@ -381,7 +381,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
}
// else
// {
// llwarns << "<param_alpha> element is missing tga_file attribute." << llendl;
// LL_WARNS() << "<param_alpha> element is missing tga_file attribute." << LL_ENDL;
// }
static LLStdStringHandle multiply_blend_string = LLXmlTree::addAttributeString("multiply_blend");
@ -482,7 +482,7 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
}
}
// llinfos << "param " << mName << " = " << new_weight << llendl;
// LL_INFOS() << "param " << mName << " = " << new_weight << LL_ENDL;
}
}
@ -557,13 +557,13 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node)
}
if (!mNumColors)
{
llwarns << "<param_color> is missing <value> sub-elements" << llendl;
LL_WARNS() << "<param_color> is missing <value> sub-elements" << LL_ENDL;
return FALSE;
}
if ((mOperation == LLTexLayerParamColor::OP_BLEND) && (mNumColors != 1))
{
llwarns << "<param_color> with operation\"blend\" must have exactly one <value>" << llendl;
LL_WARNS() << "<param_color> with operation\"blend\" must have exactly one <value>" << LL_ENDL;
return FALSE;
}

View File

@ -150,7 +150,7 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp)
{
if( !param->linkDrivenParams(boost::bind(param_function,avatarp,_1 ), true))
{
llwarns << "could not link driven params for wearable " << getName() << " id: " << param->getID() << llendl;
LL_WARNS() << "could not link driven params for wearable " << getName() << " id: " << param->getID() << LL_ENDL;
continue;
}
}
@ -174,7 +174,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
}
else
{
llerrs << "could not find layerset for LTO in wearable!" << llendl;
LL_ERRS() << "could not find layerset for LTO in wearable!" << LL_ENDL;
}
}
@ -208,7 +208,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// read header and version
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Failed to read wearable asset input stream." << llendl;
LL_WARNS() << "Failed to read wearable asset input stream." << LL_ENDL;
return LLWearable::FAILURE;
}
if ( 1 != sscanf( /* Flawfinder: ignore */
@ -226,15 +226,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// these wearables get re-saved with version definition 22.
if( mDefinitionVersion > LLWearable::sCurrentDefinitionVersion && mDefinitionVersion != 24 )
{
llwarns << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << llendl;
LL_WARNS() << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << LL_ENDL;
return LLWearable::FAILURE;
}
// name may be empty
if (!input_stream.good())
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading name" << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading name" << LL_ENDL;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
@ -243,8 +243,8 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// description may be empty
if (!input_stream.good())
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading description" << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading description" << LL_ENDL;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
@ -253,15 +253,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// permissions may have extra empty lines before the correct line
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading permissions" << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading permissions" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 perm_version = -1;
if ( 1 != sscanf( buffer, " permissions %d\n", &perm_version ) ||
perm_version != 0 )
{
llwarns << "Bad Wearable asset: missing valid permissions" << llendl;
LL_WARNS() << "Bad Wearable asset: missing valid permissions" << LL_ENDL;
return LLWearable::FAILURE;
}
if( !mPermissions.importLegacyStream( input_stream ) )
@ -272,15 +272,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// sale info
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading sale info" << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading sale info" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 sale_info_version = -1;
if ( 1 != sscanf( buffer, " sale_info %d\n", &sale_info_version ) ||
sale_info_version != 0 )
{
llwarns << "Bad Wearable asset: missing valid sale_info" << llendl;
LL_WARNS() << "Bad Wearable asset: missing valid sale_info" << LL_ENDL;
return LLWearable::FAILURE;
}
// Sale info used to contain next owner perm. It is now in the
@ -306,14 +306,14 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// wearable type
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading type" << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading type" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 type = -1;
if ( 1 != sscanf( buffer, "type %d\n", &type ) )
{
llwarns << "Bad Wearable asset: bad type" << llendl;
LL_WARNS() << "Bad Wearable asset: bad type" << LL_ENDL;
return LLWearable::FAILURE;
}
if( 0 <= type && type < LLWearableType::WT_COUNT )
@ -323,36 +323,36 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
else
{
mType = LLWearableType::WT_COUNT;
llwarns << "Bad Wearable asset: bad type #" << type << llendl;
LL_WARNS() << "Bad Wearable asset: bad type #" << type << LL_ENDL;
return LLWearable::FAILURE;
}
// parameters header
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading parameters header" << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading parameters header" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 num_parameters = -1;
if ( 1 != sscanf( buffer, "parameters %d\n", &num_parameters ) )
{
llwarns << "Bad Wearable asset: missing parameters block" << llendl;
LL_WARNS() << "Bad Wearable asset: missing parameters block" << LL_ENDL;
return LLWearable::FAILURE;
}
if ( num_parameters > MAX_WEARABLE_ASSET_PARAMETERS )
{
llwarns << "Bad Wearable asset: too many parameters, "
<< num_parameters << llendl;
LL_WARNS() << "Bad Wearable asset: too many parameters, "
<< num_parameters << LL_ENDL;
return LLWearable::FAILURE;
}
if( num_parameters != mVisualParamIndexMap.size() )
{
llwarns << "Wearable parameter mismatch. Reading in "
LL_WARNS() << "Wearable parameter mismatch. Reading in "
<< num_parameters << " from file, but created "
<< mVisualParamIndexMap.size()
<< " from avatar parameters. type: "
<< getType() << llendl;
<< getType() << LL_ENDL;
}
// parameters
@ -361,15 +361,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
{
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading parameter #" << i << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading parameter #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
S32 param_id = 0;
F32 param_weight = 0.f;
if ( 2 != sscanf( buffer, "%d %f\n", &param_id, &param_weight ) )
{
llwarns << "Bad Wearable asset: bad parameter, #" << i << llendl;
LL_WARNS() << "Bad Wearable asset: bad parameter, #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
mSavedVisualParamMap[param_id] = param_weight;
@ -378,20 +378,20 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// textures header
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading textures header" << i << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading textures header" << i << LL_ENDL;
return LLWearable::FAILURE;
}
S32 num_textures = -1;
if ( 1 != sscanf( buffer, "textures %d\n", &num_textures) )
{
llwarns << "Bad Wearable asset: missing textures block" << llendl;
LL_WARNS() << "Bad Wearable asset: missing textures block" << LL_ENDL;
return LLWearable::FAILURE;
}
if ( num_textures > MAX_WEARABLE_ASSET_TEXTURES )
{
llwarns << "Bad Wearable asset: too many textures, "
<< num_textures << llendl;
LL_WARNS() << "Bad Wearable asset: too many textures, "
<< num_textures << LL_ENDL;
return LLWearable::FAILURE;
}
@ -400,8 +400,8 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
{
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading textures #" << i << llendl;
LL_WARNS() << "Bad Wearable asset: early end of input stream "
<< "while reading textures #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
S32 te = 0;
@ -410,14 +410,14 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
"%d %36s\n",
&te, uuid_buffer) )
{
llwarns << "Bad Wearable asset: bad texture, #" << i << llendl;
LL_WARNS() << "Bad Wearable asset: bad texture, #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
if( !LLUUID::validate( uuid_buffer ) )
{
llwarns << "Bad Wearable asset: bad texture uuid: "
<< uuid_buffer << llendl;
LL_WARNS() << "Bad Wearable asset: bad texture uuid: "
<< uuid_buffer << LL_ENDL;
return LLWearable::FAILURE;
}
LLUUID id = LLUUID(uuid_buffer);
@ -656,7 +656,7 @@ void LLWearable::setVisualParamWeight(S32 param_index, F32 value, BOOL upload_ba
}
else
{
llerrs << "LLWearable::setVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << llendl;
LL_ERRS() << "LLWearable::setVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << LL_ENDL;
}
}
@ -669,7 +669,7 @@ F32 LLWearable::getVisualParamWeight(S32 param_index) const
}
else
{
llwarns << "LLWerable::getVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << llendl;
LL_WARNS() << "LLWerable::getVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << LL_ENDL;
}
return (F32)-1.0;
}

View File

@ -75,13 +75,13 @@ void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LL
wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end())
{
llwarns << "invalid type, type " << type << " index " << index << llendl;
LL_WARNS() << "invalid type, type " << type << " index " << index << LL_ENDL;
return;
}
wearableentry_vec_t& wearable_vec = wearable_iter->second;
if (index>=wearable_vec.size())
{
llwarns << "invalid index, type " << type << " index " << index << llendl;
LL_WARNS() << "invalid index, type " << type << " index " << index << LL_ENDL;
}
else
{
@ -99,7 +99,7 @@ U32 LLWearableData::pushWearable(const LLWearableType::EType type,
if (wearable == NULL)
{
// no null wearables please!
llwarns << "Null wearable sent for type " << type << llendl;
LL_WARNS() << "Null wearable sent for type " << type << LL_ENDL;
return MAX_CLOTHING_PER_TYPE;
}
if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
@ -221,7 +221,7 @@ U32 LLWearableData::getWearableIndex(const LLWearable *wearable) const
wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end())
{
llwarns << "tried to get wearable index with an invalid type!" << llendl;
LL_WARNS() << "tried to get wearable index with an invalid type!" << LL_ENDL;
return MAX_CLOTHING_PER_TYPE;
}
const wearableentry_vec_t& wearable_vec = wearable_iter->second;

View File

@ -137,7 +137,7 @@ S32 vfs_seek(void *datasource, ogg_int64_t offset, S32 whence)
origin = -1;
break;
default:
llerrs << "Invalid whence argument to vfs_seek" << llendl;
LL_ERRS() << "Invalid whence argument to vfs_seek" << LL_ENDL;
return -1;
}
@ -199,12 +199,12 @@ BOOL LLVorbisDecodeState::initDecode()
vfs_callbacks.close_func = vfs_close;
vfs_callbacks.tell_func = vfs_tell;
//llinfos << "Initing decode from vfile: " << mUUID << llendl;
//LL_INFOS() << "Initing decode from vfile: " << mUUID << LL_ENDL;
mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND);
if (!mInFilep || !mInFilep->getSize())
{
llwarns << "unable to open vorbis source vfile for reading" << llendl;
LL_WARNS() << "unable to open vorbis source vfile for reading" << LL_ENDL;
delete mInFilep;
mInFilep = NULL;
return FALSE;
@ -213,7 +213,7 @@ BOOL LLVorbisDecodeState::initDecode()
S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
if(r < 0)
{
llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl;
LL_WARNS() << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << LL_ENDL;
return(FALSE);
}
@ -231,36 +231,36 @@ BOOL LLVorbisDecodeState::initDecode()
if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS )
{
abort_decode = true;
llwarns << "Bad channel count: " << vi->channels << llendl;
LL_WARNS() << "Bad channel count: " << vi->channels << LL_ENDL;
}
}
else // !vi
{
abort_decode = true;
llwarns << "No default bitstream found" << llendl;
LL_WARNS() << "No default bitstream found" << LL_ENDL;
}
if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES ||
(size_t)sample_count <= 0)
{
abort_decode = true;
llwarns << "Illegal sample count: " << sample_count << llendl;
LL_WARNS() << "Illegal sample count: " << sample_count << LL_ENDL;
}
if( size_guess > LLVORBIS_CLIP_REJECT_SIZE ||
size_guess < 0)
{
abort_decode = true;
llwarns << "Illegal sample size: " << size_guess << llendl;
LL_WARNS() << "Illegal sample size: " << size_guess << LL_ENDL;
}
if( abort_decode )
{
llwarns << "Canceling initDecode. Bad asset: " << mUUID << llendl;
LL_WARNS() << "Canceling initDecode. Bad asset: " << mUUID << LL_ENDL;
vorbis_comment* comment = ov_comment(&mVF,-1);
if (comment && comment->vendor)
{
llwarns << "Bad asset encoded by: " << comment->vendor << llendl;
LL_WARNS() << "Bad asset encoded by: " << comment->vendor << LL_ENDL;
}
delete mInFilep;
mInFilep = NULL;
@ -361,12 +361,12 @@ BOOL LLVorbisDecodeState::decodeSection()
{
if (!mInFilep)
{
llwarns << "No VFS file to decode in vorbis!" << llendl;
LL_WARNS() << "No VFS file to decode in vorbis!" << LL_ENDL;
return TRUE;
}
if (mDone)
{
// llwarns << "Already done with decode, aborting!" << llendl;
// LL_WARNS() << "Already done with decode, aborting!" << LL_ENDL;
return TRUE;
}
char pcmout[4096]; /*Flawfinder: ignore*/
@ -379,14 +379,14 @@ BOOL LLVorbisDecodeState::decodeSection()
eof = TRUE;
mDone = TRUE;
mValid = TRUE;
// llinfos << "Vorbis EOF" << llendl;
// LL_INFOS() << "Vorbis EOF" << LL_ENDL;
}
else if (ret < 0)
{
/* error in the stream. Not a problem, just reporting it in
case we (the app) cares. In this case, we don't. */
llwarns << "BAD vorbis decode in decodeSection." << llendl;
LL_WARNS() << "BAD vorbis decode in decodeSection." << LL_ENDL;
mValid = FALSE;
mDone = TRUE;
@ -395,7 +395,7 @@ BOOL LLVorbisDecodeState::decodeSection()
}
else
{
// llinfos << "Vorbis read " << ret << "bytes" << llendl;
// LL_INFOS() << "Vorbis read " << ret << "bytes" << LL_ENDL;
/* we don't bother dealing with sample rate changes, etc, but.
you'll have to*/
std::copy(pcmout, pcmout+ret, std::back_inserter(mWAVBuffer));
@ -407,7 +407,7 @@ BOOL LLVorbisDecodeState::finishDecode()
{
if (!isValid())
{
llwarns << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << llendl;
LL_WARNS() << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << LL_ENDL;
return TRUE; // We've finished
}
@ -482,7 +482,7 @@ BOOL LLVorbisDecodeState::finishDecode()
if (36 == data_length)
{
llwarns << "BAD Vorbis decode in finishDecode!" << llendl;
LL_WARNS() << "BAD Vorbis decode in finishDecode!" << LL_ENDL;
mValid = FALSE;
return TRUE; // we've finished
}
@ -499,7 +499,7 @@ BOOL LLVorbisDecodeState::finishDecode()
{
if (mBytesRead == 0)
{
llwarns << "Unable to write file in LLVorbisDecodeState::finishDecode" << llendl;
LL_WARNS() << "Unable to write file in LLVorbisDecodeState::finishDecode" << LL_ENDL;
mValid = FALSE;
return TRUE; // we've finished
}
@ -517,7 +517,7 @@ BOOL LLVorbisDecodeState::finishDecode()
LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV);
output.write(&mWAVBuffer[0], mWAVBuffer.size());
#endif
//llinfos << "Finished decode for " << getUUID() << llendl;
//LL_INFOS() << "Finished decode for " << getUUID() << LL_ENDL;
return TRUE;
}
@ -526,7 +526,7 @@ void LLVorbisDecodeState::flushBadFile()
{
if (mInFilep)
{
llwarns << "Flushing bad vorbis file from VFS for " << mUUID << llendl;
LL_WARNS() << "Flushing bad vorbis file from VFS for " << mUUID << LL_ENDL;
mInFilep->remove();
}
}
@ -570,7 +570,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
if (mCurrentDecodep->isDone() && !mCurrentDecodep->isValid())
{
// We had an error when decoding, abort.
llwarns << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << llendl;
LL_WARNS() << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << LL_ENDL;
mCurrentDecodep->flushBadFile();
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
adp->setHasValidData(false);
@ -592,7 +592,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
if (!adp)
{
llwarns << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << llendl;
LL_WARNS() << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << LL_ENDL;
}
else if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone())
{
@ -603,12 +603,12 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
// At this point, we could see if anyone needs this sound immediately, but
// I'm not sure that there's a reason to - we need to poll all of the playing
// sounds anyway.
//llinfos << "Finished the vorbis decode, now what?" << llendl;
//LL_INFOS() << "Finished the vorbis decode, now what?" << LL_ENDL;
}
else
{
adp->setHasCompletedDecode(true);
llinfos << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << llendl;
LL_INFOS() << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << LL_ENDL;
}
mCurrentDecodep = NULL;
}
@ -634,7 +634,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
continue;
}
lldebugs << "Decoding " << uuid << " from audio queue!" << llendl;
LL_DEBUGS() << "Decoding " << uuid << " from audio queue!" << LL_ENDL;
std::string uuid_str;
std::string d_path;
@ -677,19 +677,19 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
if (gAudiop->hasDecodedFile(uuid))
{
// Already have a decoded version, don't need to decode it.
//llinfos << "addDecodeRequest for " << uuid << " has decoded file already" << llendl;
//LL_INFOS() << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL;
return TRUE;
}
if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
{
// Just put it on the decode queue.
//llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl;
//LL_INFOS() << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL;
mImpl->mDecodeQueue.push_back(uuid);
return TRUE;
}
//llinfos << "addDecodeRequest for " << uuid << " no file available" << llendl;
//LL_INFOS() << "addDecodeRequest for " << uuid << " no file available" << LL_ENDL;
return FALSE;
}

View File

@ -123,7 +123,7 @@ bool LLAudioEngine::init(const S32 num_channels, void* userdata)
// Initialize the decode manager
gAudioDecodeMgrp = new LLAudioDecodeMgr;
llinfos << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl;
LL_INFOS() << "LLAudioEngine::init() AudioEngine successfully initialized" << LL_ENDL;
return true;
}
@ -308,7 +308,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
LLAudioChannel *channelp = getFreeChannel(max_priority);
if (channelp)
{
//llinfos << "Replacing source in channel due to priority!" << llendl;
//LL_INFOS() << "Replacing source in channel due to priority!" << LL_ENDL;
max_sourcep->setChannel(channelp);
channelp->setSource(max_sourcep);
if (max_sourcep->isSyncSlave())
@ -479,7 +479,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
{
if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f)
{
//llinfos << "Flushing unused buffer!" << llendl;
//LL_INFOS() << "Flushing unused buffer!" << LL_ENDL;
mBuffers[i]->mAudioDatap->mBufferp = NULL;
delete mBuffers[i];
mBuffers[i] = NULL;
@ -591,8 +591,8 @@ LLAudioBuffer * LLAudioEngine::getFreeBuffer()
if (buffer_id >= 0)
{
lldebugs << "Taking over unused buffer " << buffer_id << llendl;
//llinfos << "Flushing unused buffer!" << llendl;
LL_DEBUGS() << "Taking over unused buffer " << buffer_id << LL_ENDL;
//LL_INFOS() << "Flushing unused buffer!" << LL_ENDL;
mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL;
delete mBuffers[buffer_id];
mBuffers[buffer_id] = createBuffer();
@ -684,7 +684,7 @@ bool LLAudioEngine::preloadSound(const LLUUID &uuid)
// At some point we need to have the audio/asset system check the static VFS
// before it goes off and fetches stuff from the server.
//llwarns << "Used internal preload for non-local sound" << llendl;
//LL_WARNS() << "Used internal preload for non-local sound" << LL_ENDL;
return false;
}
@ -815,7 +815,7 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i
const S32 type, const LLVector3d &pos_global)
{
// Create a new source (since this can't be associated with an existing source.
//llinfos << "Localized: " << audio_uuid << llendl;
//LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL;
if (mMuted)
{
@ -982,7 +982,7 @@ void LLAudioEngine::cleanupAudioSource(LLAudioSource *asp)
iter = mAllSources.find(asp->getID());
if (iter == mAllSources.end())
{
llwarns << "Cleaning up unknown audio source!" << llendl;
LL_WARNS() << "Cleaning up unknown audio source!" << LL_ENDL;
return;
}
delete asp;
@ -1019,10 +1019,10 @@ bool LLAudioEngine::hasLocalFile(const LLUUID &uuid)
void LLAudioEngine::startNextTransfer()
{
//llinfos << "LLAudioEngine::startNextTransfer()" << llendl;
//LL_INFOS() << "LLAudioEngine::startNextTransfer()" << LL_ENDL;
if (mCurrentTransfer.notNull() || getMuted())
{
//llinfos << "Transfer in progress, aborting" << llendl;
//LL_INFOS() << "Transfer in progress, aborting" << LL_ENDL;
return;
}
@ -1203,7 +1203,7 @@ void LLAudioEngine::startNextTransfer()
if (asset_id.notNull())
{
llinfos << "Getting asset data for: " << asset_id << llendl;
LL_INFOS() << "Getting asset data for: " << asset_id << LL_ENDL;
gAudiop->mCurrentTransfer = asset_id;
gAudiop->mCurrentTransferTimer.reset();
gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND,
@ -1211,7 +1211,7 @@ void LLAudioEngine::startNextTransfer()
}
else
{
//llinfos << "No pending transfers?" << llendl;
//LL_INFOS() << "No pending transfers?" << LL_ENDL;
}
}
@ -1221,7 +1221,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
{
if (result_code)
{
llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl;
LL_INFOS() << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << LL_ENDL;
// Need to mark data as bad to avoid constant rerequests.
LLAudioData *adp = gAudiop->getAudioData(uuid);
if (adp)
@ -1238,11 +1238,11 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
if (!adp)
{
// Should never happen
llwarns << "Got asset callback without audio data for " << uuid << llendl;
LL_WARNS() << "Got asset callback without audio data for " << uuid << LL_ENDL;
}
else
{
// llinfos << "Got asset callback with good audio data for " << uuid << ", making decode request" << llendl;
// LL_INFOS() << "Got asset callback with good audio data for " << uuid << ", making decode request" << LL_ENDL;
adp->setHasValidData(true);
adp->setHasLocalData(true);
gAudioDecodeMgrp->addDecodeRequest(uuid);
@ -1321,7 +1321,7 @@ void LLAudioSource::update()
}
else if (adp->hasCompletedDecode()) // Only mark corrupted after decode is done
{
llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl;
LL_WARNS() << "Marking LLAudioSource corrupted for " << adp->getID() << LL_ENDL;
mCorrupted = true ;
}
}
@ -1357,7 +1357,7 @@ bool LLAudioSource::setupChannel()
if (!adp->getBuffer())
{
// We're not ready to play back the sound yet, so don't try and allocate a channel for it.
//llwarns << "Aborting, no buffer" << llendl;
//LL_WARNS() << "Aborting, no buffer" << LL_ENDL;
return false;
}
@ -1375,7 +1375,7 @@ bool LLAudioSource::setupChannel()
// Ugh, we don't have any free channels.
// Now we have to reprioritize.
// For now, just don't play the sound.
//llwarns << "Aborting, no free channels" << llendl;
//LL_WARNS() << "Aborting, no free channels" << LL_ENDL;
return false;
}
@ -1474,7 +1474,7 @@ bool LLAudioSource::isDone() const
{
// We don't have a channel assigned, and it's been
// over 15 seconds since we tried to play it. Don't bother.
//llinfos << "No channel assigned, source is done" << llendl;
//LL_INFOS() << "No channel assigned, source is done" << LL_ENDL;
return true;
}
else
@ -1640,7 +1640,7 @@ LLAudioChannel::LLAudioChannel() :
LLAudioChannel::~LLAudioChannel()
{
// Need to disconnect any sources which are using this channel.
//llinfos << "Cleaning up audio channel" << llendl;
//LL_INFOS() << "Cleaning up audio channel" << LL_ENDL;
if (mCurrentSourcep)
{
mCurrentSourcep->setChannel(NULL);
@ -1651,12 +1651,12 @@ LLAudioChannel::~LLAudioChannel()
void LLAudioChannel::setSource(LLAudioSource *sourcep)
{
//llinfos << this << ": setSource(" << sourcep << ")" << llendl;
//LL_INFOS() << this << ": setSource(" << sourcep << ")" << LL_ENDL;
if (!sourcep)
{
// Clearing the source for this channel, don't need to do anything.
//llinfos << "Clearing source for channel" << llendl;
//LL_INFOS() << "Clearing source for channel" << LL_ENDL;
cleanup();
mCurrentSourcep = NULL;
mWaiting = false;
@ -1666,7 +1666,7 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep)
if (sourcep == mCurrentSourcep)
{
// Don't reallocate the channel, this will make FMOD goofy.
//llinfos << "Calling setSource with same source!" << llendl;
//LL_INFOS() << "Calling setSource with same source!" << LL_ENDL;
}
mCurrentSourcep = sourcep;
@ -1768,7 +1768,7 @@ bool LLAudioData::load()
if (mBufferp)
{
// We already have this sound in a buffer, don't do anything.
llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl;
LL_INFOS() << "Already have a buffer for this sound, don't bother loading!" << LL_ENDL;
return true;
}
@ -1776,7 +1776,7 @@ bool LLAudioData::load()
if (!mBufferp)
{
// No free buffers, abort.
llinfos << "Not able to allocate a new audio buffer, aborting." << llendl;
LL_INFOS() << "Not able to allocate a new audio buffer, aborting." << LL_ENDL;
return true;
}

View File

@ -67,7 +67,7 @@ inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string)
{
if(result == FMOD_OK)
return false;
lldebugs << string << " Error: " << FMOD_ErrorString(result) << llendl;
LL_DEBUGS() << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL;
return true;
}
@ -75,11 +75,11 @@ void* F_STDCALL decode_alloc(unsigned int size, FMOD_MEMORY_TYPE type, const cha
{
if(type & FMOD_MEMORY_STREAM_DECODE)
{
llinfos << "Decode buffer size: " << size << llendl;
LL_INFOS() << "Decode buffer size: " << size << LL_ENDL;
}
else if(type & FMOD_MEMORY_STREAM_FILE)
{
llinfos << "Strean buffer size: " << size << llendl;
LL_INFOS() << "Strean buffer size: " << size << LL_ENDL;
}
return new char[size];
}
@ -305,7 +305,7 @@ void LLAudioEngine_FMODEX::allocateListener(void)
mListenerp = (LLListener *) new LLListener_FMODEX(mSystem);
if (!mListenerp)
{
llwarns << "Listener creation failed" << llendl;
LL_WARNS() << "Listener creation failed" << LL_ENDL;
}
}
@ -314,16 +314,16 @@ void LLAudioEngine_FMODEX::shutdown()
{
stopInternetStream();
llinfos << "About to LLAudioEngine::shutdown()" << llendl;
LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL;
LLAudioEngine::shutdown();
llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl;
LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << LL_ENDL;
if ( mSystem ) // speculative fix for MAINT-2657
{
mSystem->close();
mSystem->release();
}
llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl;
LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << LL_ENDL;
delete mListenerp;
mListenerp = NULL;
@ -472,7 +472,7 @@ bool LLAudioChannelFMODEX::updateBuffer()
{
// This is bad, there should ALWAYS be a sound associated with a legit
// buffer.
llerrs << "No FMOD sound!" << llendl;
LL_ERRS() << "No FMOD sound!" << LL_ENDL;
return false;
}
@ -485,7 +485,7 @@ bool LLAudioChannelFMODEX::updateBuffer()
Check_FMOD_Error(result, "FMOD::System::playSound");
}
//llinfos << "Setting up channel " << std::hex << mChannelID << std::dec << llendl;
//LL_INFOS() << "Setting up channel " << std::hex << mChannelID << std::dec << LL_ENDL;
}
// If we have a source for the channel, we need to update its gain.
@ -502,8 +502,8 @@ bool LLAudioChannelFMODEX::updateBuffer()
{
S32 index;
mChannelp->getIndex(&index);
llwarns << "Channel " << index << "Source ID: " << mCurrentSourcep->getID()
<< " at " << mCurrentSourcep->getPositionGlobal() << llendl;
LL_WARNS() << "Channel " << index << "Source ID: " << mCurrentSourcep->getID()
<< " at " << mCurrentSourcep->getPositionGlobal() << LL_ENDL;
}*/
}
@ -573,11 +573,11 @@ void LLAudioChannelFMODEX::cleanup()
{
if (!mChannelp)
{
//llinfos << "Aborting cleanup with no channel handle." << llendl;
//LL_INFOS() << "Aborting cleanup with no channel handle." << LL_ENDL;
return;
}
//llinfos << "Cleaning up channel: " << mChannelID << llendl;
//LL_INFOS() << "Cleaning up channel: " << mChannelID << LL_ENDL;
Check_FMOD_Error(mChannelp->stop(),"FMOD::Channel::stop");
mCurrentBufferp = NULL;
@ -589,7 +589,7 @@ void LLAudioChannelFMODEX::play()
{
if (!mChannelp)
{
llwarns << "Playing without a channel handle, aborting" << llendl;
LL_WARNS() << "Playing without a channel handle, aborting" << LL_ENDL;
return;
}
@ -697,7 +697,7 @@ bool LLAudioBufferFMODEX::loadWAV(const std::string& filename)
if (result != FMOD_OK)
{
// We failed to load the file for some reason.
llwarns << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << llendl;
LL_WARNS() << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << LL_ENDL;
//
// If we EVER want to load wav files provided by end users, we need

View File

@ -91,7 +91,7 @@ void LLStreamingAudio_FMODEX::start(const std::string& url)
{
//if (!mInited)
//{
// llwarns << "startInternetStream before audio initialized" << llendl;
// LL_WARNS() << "startInternetStream before audio initialized" << LL_ENDL;
// return;
//}
@ -100,13 +100,13 @@ void LLStreamingAudio_FMODEX::start(const std::string& url)
if (!url.empty())
{
llinfos << "Starting internet stream: " << url << llendl;
LL_INFOS() << "Starting internet stream: " << url << LL_ENDL;
mCurrentInternetStreamp = new LLAudioStreamManagerFMODEX(mSystem,url);
mURL = url;
}
else
{
llinfos << "Set internet stream to null" << llendl;
LL_INFOS() << "Set internet stream to null" << LL_ENDL;
mURL.clear();
}
}
@ -121,7 +121,7 @@ void LLStreamingAudio_FMODEX::update()
LLAudioStreamManagerFMODEX *streamp = *iter;
if (streamp->stopStream())
{
llinfos << "Closed dead stream" << llendl;
LL_INFOS() << "Closed dead stream" << LL_ENDL;
delete streamp;
mDeadStreams.erase(iter++);
}
@ -181,7 +181,7 @@ void LLStreamingAudio_FMODEX::update()
{
if (!strcmp(tag.name, "Sample Rate Change"))
{
llinfos << "Stream forced changing sample rate to " << *((float *)tag.data) << llendl;
LL_INFOS() << "Stream forced changing sample rate to " << *((float *)tag.data) << LL_ENDL;
mFMODInternetStreamChannelp->setFrequency(*((float *)tag.data));
}
continue;
@ -195,9 +195,9 @@ void LLStreamingAudio_FMODEX::update()
mFMODInternetStreamChannelp->getPaused(&paused);
if(!paused)
{
llinfos << "Stream starvation detected! Pausing stream until buffer nearly full." << llendl;
llinfos << " (diskbusy="<<diskbusy<<")" << llendl;
llinfos << " (progress="<<progress<<")" << llendl;
LL_INFOS() << "Stream starvation detected! Pausing stream until buffer nearly full." << LL_ENDL;
LL_INFOS() << " (diskbusy="<<diskbusy<<")" << LL_ENDL;
LL_INFOS() << " (progress="<<progress<<")" << LL_ENDL;
mFMODInternetStreamChannelp->setPaused(true);
}
}
@ -220,14 +220,14 @@ void LLStreamingAudio_FMODEX::stop()
if (mCurrentInternetStreamp)
{
llinfos << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << llendl;
LL_INFOS() << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << LL_ENDL;
if (mCurrentInternetStreamp->stopStream())
{
delete mCurrentInternetStreamp;
}
else
{
llwarns << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << llendl;
LL_WARNS() << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << LL_ENDL;
mDeadStreams.push_back(mCurrentInternetStreamp);
}
mCurrentInternetStreamp = NULL;
@ -314,9 +314,9 @@ LLAudioStreamManagerFMODEX::LLAudioStreamManagerFMODEX(FMOD::System *system, con
if (result!= FMOD_OK)
{
llwarns << "Couldn't open fmod stream, error "
LL_WARNS() << "Couldn't open fmod stream, error "
<< FMOD_ErrorString(result)
<< llendl;
<< LL_ENDL;
mReady = false;
return;
}
@ -329,7 +329,7 @@ FMOD::Channel *LLAudioStreamManagerFMODEX::startStream()
// We need a live and opened stream before we try and play it.
if (!mInternetStream || getOpenState() != FMOD_OPENSTATE_READY)
{
llwarns << "No internet stream to start playing!" << llendl;
LL_WARNS() << "No internet stream to start playing!" << LL_ENDL;
return NULL;
}

View File

@ -127,7 +127,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
return(LLVORBISENC_CHUNK_SIZE_ERR);
}
// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))
{
@ -224,7 +224,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
std::string error_msg;
if ((format_error = check_for_invalid_wav_formats(in_fname, error_msg)))
{
llwarns << error_msg << ": " << in_fname << llendl;
LL_WARNS() << error_msg << ": " << in_fname << LL_ENDL;
return(format_error);
}
@ -237,8 +237,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
infile.open(in_fname,LL_APR_RB);
if (!infile.getFileHandle())
{
llwarns << "Couldn't open temporary ogg file for writing: " << in_fname
<< llendl;
LL_WARNS() << "Couldn't open temporary ogg file for writing: " << in_fname
<< LL_ENDL;
return(LLVORBISENC_SOURCE_OPEN_ERR);
}
@ -246,8 +246,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
outfile.open(out_fname,LL_APR_WPB);
if (!outfile.getFileHandle())
{
llwarns << "Couldn't open upload sound file for reading: " << in_fname
<< llendl;
LL_WARNS() << "Couldn't open upload sound file for reading: " << in_fname
<< LL_ENDL;
return(LLVORBISENC_DEST_OPEN_ERR);
}
@ -265,7 +265,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
+ ((U32) wav_header[5] << 8)
+ wav_header[4];
// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))
{
@ -308,8 +308,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
// vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE_AVG,NULL) ||
// vorbis_encode_setup_init(&vi))
{
llwarns << "unable to initialize vorbis codec at quality " << quality << llendl;
// llwarns << "unable to initialize vorbis codec at bitrate " << bitrate << llendl;
LL_WARNS() << "unable to initialize vorbis codec at quality " << quality << LL_ENDL;
// LL_WARNS() << "unable to initialize vorbis codec at bitrate " << bitrate << LL_ENDL;
return(LLVORBISENC_DEST_OPEN_ERR);
}
@ -498,7 +498,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
libvorbis. They're never freed or manipulated directly */
// fprintf(stderr,"Vorbis encoding: Done.\n");
llinfos << "Vorbis encoding: Done." << llendl;
LL_INFOS() << "Vorbis encoding: Done." << LL_ENDL;
#endif
return(LLVORBISENC_NOERR);

View File

@ -130,14 +130,14 @@ LLQuaternion::Order bvhStringToOrder( char *str )
if (mStatus == LLBVHLoader::ST_NO_XLT_FILE)
{
llwarns << "NOTE: No translation table found." << llendl;
LL_WARNS() << "NOTE: No translation table found." << LL_ENDL;
return;
}
else
{
if (mStatus != LLBVHLoader::ST_OK)
{
llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl;
LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL;
return;
}
}
@ -147,7 +147,7 @@ LLQuaternion::Order bvhStringToOrder( char *str )
mStatus = loadBVHFile(buffer, error_text, error_line);
if (mStatus != LLBVHLoader::ST_OK)
{
llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl;
LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL;
return;
}
@ -163,10 +163,10 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error
errorLine = 0;
mStatus = loadTranslationTable("anim.ini");
loadStatus = mStatus;
llinfos<<"Load Status 00 : "<< loadStatus << llendl;
LL_INFOS()<<"Load Status 00 : "<< loadStatus << LL_ENDL;
if (mStatus == E_ST_NO_XLT_FILE)
{
//llwarns << "NOTE: No translation table found." << llendl;
//LL_WARNS() << "NOTE: No translation table found." << LL_ENDL;
loadStatus = mStatus;
return;
}
@ -174,7 +174,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error
{
if (mStatus != E_ST_OK)
{
//llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl;
//LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL;
errorLine = getLineNumber();
loadStatus = mStatus;
return;
@ -187,7 +187,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error
if (mStatus != E_ST_OK)
{
//llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl;
//LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL;
loadStatus = mStatus;
errorLine = getLineNumber();
return;
@ -225,7 +225,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
if (!fp)
return E_ST_NO_XLT_FILE;
llinfos << "NOTE: Loading translation table: " << fileName << llendl;
LL_INFOS() << "NOTE: Loading translation table: " << fileName << LL_ENDL;
//--------------------------------------------------------------------
// register file to be closed on function exit
@ -289,7 +289,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
return E_ST_NO_XLT_EMOTE;
mEmoteName.assign( emote_str );
// llinfos << "NOTE: Emote: " << mEmoteName.c_str() << llendl;
// LL_INFOS() << "NOTE: Emote: " << mEmoteName.c_str() << LL_ENDL;
continue;
}
@ -304,7 +304,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
return E_ST_NO_XLT_PRIORITY;
mPriority = priority;
// llinfos << "NOTE: Priority: " << mPriority << llendl;
// LL_INFOS() << "NOTE: Priority: " << mPriority << LL_ENDL;
continue;
}
@ -697,7 +697,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
if ( !strstr(line.c_str(), "HIERARCHY") )
{
// llinfos << line << llendl;
// LL_INFOS() << line << LL_ENDL;
return E_ST_NO_HIER;
}
@ -1044,7 +1044,7 @@ void LLBVHLoader::applyTranslations()
//----------------------------------------------------------------
if ( trans.mIgnore )
{
//llinfos << "NOTE: Ignoring " << joint->mName.c_str() << llendl;
//LL_INFOS() << "NOTE: Ignoring " << joint->mName.c_str() << LL_ENDL;
joint->mIgnore = TRUE;
continue;
}
@ -1054,7 +1054,7 @@ void LLBVHLoader::applyTranslations()
//----------------------------------------------------------------
if ( ! trans.mOutName.empty() )
{
//llinfos << "NOTE: Changing " << joint->mName.c_str() << " to " << trans.mOutName.c_str() << llendl;
//LL_INFOS() << "NOTE: Changing " << joint->mName.c_str() << " to " << trans.mOutName.c_str() << LL_ENDL;
joint->mOutName = trans.mOutName;
}
@ -1071,25 +1071,25 @@ void LLBVHLoader::applyTranslations()
//----------------------------------------------------------------
if ( trans.mRelativePositionKey )
{
// llinfos << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << llendl;
// LL_INFOS() << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << LL_ENDL;
joint->mRelativePositionKey = TRUE;
}
if ( trans.mRelativeRotationKey )
{
// llinfos << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << llendl;
// LL_INFOS() << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << LL_ENDL;
joint->mRelativeRotationKey = TRUE;
}
if ( trans.mRelativePosition.magVec() > 0.0f )
{
joint->mRelativePosition = trans.mRelativePosition;
// llinfos << "NOTE: Removing " <<
// LL_INFOS() << "NOTE: Removing " <<
// joint->mRelativePosition.mV[0] << " " <<
// joint->mRelativePosition.mV[1] << " " <<
// joint->mRelativePosition.mV[2] <<
// " from all position keys in " <<
// joint->mOutName.c_str() << llendl;
// joint->mOutName.c_str() << LL_ENDL;
}
//----------------------------------------------------------------
@ -1103,9 +1103,9 @@ void LLBVHLoader::applyTranslations()
//----------------------------------------------------------------
if ( ! trans.mMergeParentName.empty() )
{
// llinfos << "NOTE: Merging " << joint->mOutName.c_str() <<
// LL_INFOS() << "NOTE: Merging " << joint->mOutName.c_str() <<
// " with parent " <<
// trans.mMergeParentName.c_str() << llendl;
// trans.mMergeParentName.c_str() << LL_ENDL;
joint->mMergeParentName = trans.mMergeParentName;
}
@ -1114,8 +1114,8 @@ void LLBVHLoader::applyTranslations()
//----------------------------------------------------------------
if ( ! trans.mMergeChildName.empty() )
{
// llinfos << "NOTE: Merging " << joint->mName.c_str() <<
// " with child " << trans.mMergeChildName.c_str() << llendl;
// LL_INFOS() << "NOTE: Merging " << joint->mName.c_str() <<
// " with child " << trans.mMergeChildName.c_str() << LL_ENDL;
joint->mMergeChildName = trans.mMergeChildName;
}
@ -1310,7 +1310,7 @@ void LLBVHLoader::optimize()
// don't output joints with no motion
if (!(pos_changed || rot_changed))
{
//llinfos << "Ignoring joint " << joint->mName << llendl;
//LL_INFOS() << "Ignoring joint " << joint->mName << LL_ENDL;
joint->mIgnore = TRUE;
}
}

View File

@ -106,7 +106,7 @@ LLJoint *LLCharacter::getJoint( const std::string &name )
if (!joint)
{
llwarns << "Failed to find joint." << llendl;
LL_WARNS() << "Failed to find joint." << LL_ENDL;
}
return joint;
}
@ -181,7 +181,7 @@ BOOL LLCharacter::isMotionActive(const LLUUID& id)
//-----------------------------------------------------------------------------
void LLCharacter::requestStopMotion( LLMotion* motion)
{
// llinfos << "DEBUG: Char::onDeactivateMotion( " << motionName << " )" << llendl;
// LL_INFOS() << "DEBUG: Char::onDeactivateMotion( " << motionName << " )" << LL_ENDL;
}
@ -242,14 +242,14 @@ void LLCharacter::dumpCharacter( LLJoint* joint )
// handle top level entry into recursion
if (joint == NULL)
{
llinfos << "DEBUG: Dumping Character @" << this << llendl;
LL_INFOS() << "DEBUG: Dumping Character @" << this << LL_ENDL;
dumpCharacter( getRootJoint() );
llinfos << "DEBUG: Done." << llendl;
LL_INFOS() << "DEBUG: Done." << LL_ENDL;
return;
}
// print joint info
llinfos << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << llendl;
LL_INFOS() << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << LL_ENDL;
// recurse
for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin();
@ -313,7 +313,7 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL
name_iter->second->setWeight(weight, upload_bake);
return TRUE;
}
llwarns << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << llendl;
LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL;
return FALSE;
}
@ -328,7 +328,7 @@ BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake)
index_iter->second->setWeight(weight, upload_bake);
return TRUE;
}
llwarns << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << llendl;
LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL;
return FALSE;
}
@ -345,7 +345,7 @@ F32 LLCharacter::getVisualParamWeight(LLVisualParam *which_param)
}
else
{
llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter*, index= " << index << llendl;
LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter*, index= " << index << LL_ENDL;
return 0.f;
}
}
@ -363,7 +363,7 @@ F32 LLCharacter::getVisualParamWeight(const char* param_name)
{
return name_iter->second->getWeight();
}
llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter: " << param_name << llendl;
LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL;
return 0.f;
}
@ -379,7 +379,7 @@ F32 LLCharacter::getVisualParamWeight(S32 index)
}
else
{
llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter index: " << index << llendl;
LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL;
return 0.f;
}
}
@ -413,7 +413,7 @@ LLVisualParam* LLCharacter::getVisualParam(const char *param_name)
{
return name_iter->second;
}
llwarns << "LLCharacter::getVisualParam() Invalid visual parameter: " << param_name << llendl;
LL_WARNS() << "LLCharacter::getVisualParam() Invalid visual parameter: " << param_name << LL_ENDL;
return NULL;
}
@ -438,8 +438,8 @@ void LLCharacter::addSharedVisualParam(LLVisualParam *param)
}
else
{
llwarns << "Shared visual parameter " << param->getName() << " does not already exist with ID " <<
param->getID() << llendl;
LL_WARNS() << "Shared visual parameter " << param->getName() << " does not already exist with ID " <<
param->getID() << LL_ENDL;
}
}
@ -454,8 +454,8 @@ void LLCharacter::addVisualParam(LLVisualParam *param)
idxres = mVisualParamIndexMap.insert(visual_param_index_map_t::value_type(index, param));
if (!idxres.second)
{
llwarns << "Visual parameter " << param->getName() << " already exists with same ID as " <<
param->getName() << llendl;
LL_WARNS() << "Visual parameter " << param->getName() << " already exists with same ID as " <<
param->getName() << LL_ENDL;
visual_param_index_map_t::iterator index_iter = idxres.first;
index_iter->second = param;
}
@ -475,7 +475,7 @@ void LLCharacter::addVisualParam(LLVisualParam *param)
name_iter->second = param;
}
}
//llinfos << "Adding Visual Param '" << param->getName() << "' ( " << index << " )" << llendl;
//LL_INFOS() << "Adding Visual Param '" << param->getName() << "' ( " << index << " )" << LL_ENDL;
}
//-----------------------------------------------------------------------------

View File

@ -89,7 +89,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte
!mCharacter->getJoint("mElbowLeft") ||
!mCharacter->getJoint("mWristLeft"))
{
llwarns << "Invalid skeleton for editing motion!" << llendl;
LL_WARNS() << "Invalid skeleton for editing motion!" << LL_ENDL;
return STATUS_FAILURE;
}
@ -102,7 +102,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte
if ( ! mParentState->getJoint() )
{
llinfos << getName() << ": Can't get parent joint." << llendl;
LL_INFOS() << getName() << ": Can't get parent joint." << LL_ENDL;
return STATUS_FAILURE;
}
@ -215,14 +215,14 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
if (!target.isFinite())
{
// Don't error out here, set a fail-safe target vector
llwarns << "Non finite target in editing motion with target distance of " << target_dist <<
" and focus point " << focus_pt << llendl;
LL_WARNS() << "Non finite target in editing motion with target distance of " << target_dist <<
" and focus point " << focus_pt << LL_ENDL;
target.setVec(1.f, 1.f, 1.f);
}
mTarget.setPosition( target + mParentJoint.getPosition());
// llinfos << "Point At: " << mTarget.getPosition() << llendl;
// LL_INFOS() << "Point At: " << mTarget.getPosition() << LL_ENDL;
// update the ikSolver
if (!mTarget.getPosition().isExactlyZero())

View File

@ -93,14 +93,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs)
BOOL LLGesture::trigger(KEY key, MASK mask)
{
llwarns << "Parent class trigger called: you probably didn't mean this." << llendl;
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
return FALSE;
}
BOOL LLGesture::trigger(const std::string& trigger_string)
{
llwarns << "Parent class trigger called: you probably didn't mean this." << llendl;
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
return FALSE;
}
@ -130,7 +130,7 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size)
if (tmp + sizeof(mKey) + sizeof(mMask) + 16 > buffer + max_size)
{
llwarns << "Attempt to read past end of buffer, bad data!!!!" << llendl;
LL_WARNS() << "Attempt to read past end of buffer, bad data!!!!" << LL_ENDL;
return buffer;
}
@ -155,7 +155,7 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size)
if (tmp > buffer + max_size)
{
llwarns << "Read past end of buffer, bad data!!!!" << llendl;
LL_WARNS() << "Read past end of buffer, bad data!!!!" << LL_ENDL;
return tmp;
}
@ -273,7 +273,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask)
}
else
{
llwarns << "NULL gesture in gesture list (" << i << ")" << llendl;
LL_WARNS() << "NULL gesture in gesture list (" << i << ")" << LL_ENDL;
}
}
return FALSE;
@ -306,7 +306,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size)
if (tmp + sizeof(count) > buffer + max_size)
{
llwarns << "Invalid max_size" << llendl;
LL_WARNS() << "Invalid max_size" << LL_ENDL;
return buffer;
}
@ -314,7 +314,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size)
if (count > MAX_GESTURES)
{
llwarns << "Unreasonably large gesture list count in deserialize: " << count << llendl;
LL_WARNS() << "Unreasonably large gesture list count in deserialize: " << count << LL_ENDL;
return tmp;
}
@ -327,7 +327,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size)
mList[i] = create_gesture(&tmp, max_size - (S32)(tmp - buffer));
if (tmp - buffer > max_size)
{
llwarns << "Deserialization read past end of buffer, bad data!!!!" << llendl;
LL_WARNS() << "Deserialization read past end of buffer, bad data!!!!" << LL_ENDL;
return tmp;
}
}

View File

@ -192,7 +192,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
}
else
{
llwarns << "Requested hand pose out of range. Ignoring requested pose." << llendl;
LL_WARNS() << "Requested hand pose out of range. Ignoring requested pose." << LL_ENDL;
}
}
@ -200,7 +200,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
mCharacter->removeAnimationData("Hand Pose Priority");
// if (requestedHandPose)
// llinfos << "Hand Pose " << *requestedHandPose << llendl;
// LL_INFOS() << "Hand Pose " << *requestedHandPose << LL_ENDL;
// if we are still blending...
if (mCurrentPose != mNewPose)

View File

@ -104,49 +104,49 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte
mPelvisJoint = character->getJoint("mPelvis");
if ( ! mPelvisJoint )
{
llinfos << getName() << ": Can't get pelvis joint." << llendl;
LL_INFOS() << getName() << ": Can't get pelvis joint." << LL_ENDL;
return STATUS_FAILURE;
}
mRootJoint = character->getJoint("mRoot");
if ( ! mRootJoint )
{
llinfos << getName() << ": Can't get root joint." << llendl;
LL_INFOS() << getName() << ": Can't get root joint." << LL_ENDL;
return STATUS_FAILURE;
}
mTorsoJoint = character->getJoint("mTorso");
if ( ! mTorsoJoint )
{
llinfos << getName() << ": Can't get torso joint." << llendl;
LL_INFOS() << getName() << ": Can't get torso joint." << LL_ENDL;
return STATUS_FAILURE;
}
mHeadJoint = character->getJoint("mHead");
if ( ! mHeadJoint )
{
llinfos << getName() << ": Can't get head joint." << llendl;
LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL;
return STATUS_FAILURE;
}
mTorsoState->setJoint( character->getJoint("mTorso") );
if ( ! mTorsoState->getJoint() )
{
llinfos << getName() << ": Can't get torso joint." << llendl;
LL_INFOS() << getName() << ": Can't get torso joint." << LL_ENDL;
return STATUS_FAILURE;
}
mNeckState->setJoint( character->getJoint("mNeck") );
if ( ! mNeckState->getJoint() )
{
llinfos << getName() << ": Can't get neck joint." << llendl;
LL_INFOS() << getName() << ": Can't get neck joint." << LL_ENDL;
return STATUS_FAILURE;
}
mHeadState->setJoint( character->getJoint("mHead") );
if ( ! mHeadState->getJoint() )
{
llinfos << getName() << ": Can't get head joint." << llendl;
LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL;
return STATUS_FAILURE;
}
@ -191,7 +191,7 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
{
LLVector3 headLookAt = *targetPos;
// llinfos << "Look At: " << headLookAt + mHeadJoint->getWorldPosition() << llendl;
// LL_INFOS() << "Look At: " << headLookAt + mHeadJoint->getWorldPosition() << LL_ENDL;
F32 lookatDistance = headLookAt.normVec();
@ -310,21 +310,21 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character)
mHeadJoint = character->getJoint("mHead");
if ( ! mHeadJoint )
{
llinfos << getName() << ": Can't get head joint." << llendl;
LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL;
return STATUS_FAILURE;
}
mLeftEyeState->setJoint( character->getJoint("mEyeLeft") );
if ( ! mLeftEyeState->getJoint() )
{
llinfos << getName() << ": Can't get left eyeball joint." << llendl;
LL_INFOS() << getName() << ": Can't get left eyeball joint." << LL_ENDL;
return STATUS_FAILURE;
}
mRightEyeState->setJoint( character->getJoint("mEyeRight") );
if ( ! mRightEyeState->getJoint() )
{
llinfos << getName() << ": Can't get Right eyeball joint." << llendl;
LL_INFOS() << getName() << ": Can't get Right eyeball joint." << LL_ENDL;
return STATUS_FAILURE;
}

View File

@ -438,7 +438,7 @@ const LLMatrix4 &LLJoint::getWorldMatrix()
//--------------------------------------------------------------------
void LLJoint::setWorldMatrix( const LLMatrix4& mat )
{
llinfos << "WARNING: LLJoint::setWorldMatrix() not correctly implemented yet" << llendl;
LL_INFOS() << "WARNING: LLJoint::setWorldMatrix() not correctly implemented yet" << LL_ENDL;
// extract global translation
LLVector3 trans( mat.mMatrix[VW][VX],
mat.mMatrix[VW][VY],

View File

@ -92,30 +92,30 @@ U32 LLKeyframeMotion::JointMotionList::dumpDiagInfo()
{
LLKeyframeMotion::JointMotion* joint_motion_p = mJointMotionArray[i];
llinfos << "\tJoint " << joint_motion_p->mJointName << llendl;
LL_INFOS() << "\tJoint " << joint_motion_p->mJointName << LL_ENDL;
if (joint_motion_p->mUsage & LLJointState::SCALE)
{
llinfos << "\t" << joint_motion_p->mScaleCurve.mNumKeys << " scale keys at "
<< joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey) << " bytes" << llendl;
LL_INFOS() << "\t" << joint_motion_p->mScaleCurve.mNumKeys << " scale keys at "
<< joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey) << " bytes" << LL_ENDL;
total_size += joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey);
}
if (joint_motion_p->mUsage & LLJointState::ROT)
{
llinfos << "\t" << joint_motion_p->mRotationCurve.mNumKeys << " rotation keys at "
<< joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey) << " bytes" << llendl;
LL_INFOS() << "\t" << joint_motion_p->mRotationCurve.mNumKeys << " rotation keys at "
<< joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey) << " bytes" << LL_ENDL;
total_size += joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey);
}
if (joint_motion_p->mUsage & LLJointState::POS)
{
llinfos << "\t" << joint_motion_p->mPositionCurve.mNumKeys << " position keys at "
<< joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey) << " bytes" << llendl;
LL_INFOS() << "\t" << joint_motion_p->mPositionCurve.mNumKeys << " position keys at "
<< joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey) << " bytes" << LL_ENDL;
total_size += joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey);
}
}
llinfos << "Size: " << total_size << " bytes" << llendl;
LL_INFOS() << "Size: " << total_size << " bytes" << LL_ENDL;
return total_size;
}
@ -557,7 +557,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
if (!sVFS)
{
llerrs << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << llendl;
LL_ERRS() << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << LL_ENDL;
}
BOOL success = FALSE;
@ -583,18 +583,18 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
if (!success)
{
llwarns << "Can't open animation file " << mID << llendl;
LL_WARNS() << "Can't open animation file " << mID << LL_ENDL;
mAssetStatus = ASSET_FETCH_FAILED;
return STATUS_FAILURE;
}
lldebugs << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << llendl;
LL_DEBUGS() << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << LL_ENDL;
LLDataPackerBinaryBuffer dp(anim_data, anim_file_size);
if (!deserialize(dp))
{
llwarns << "Failed to decode asset for animation " << getName() << ":" << getID() << llendl;
LL_WARNS() << "Failed to decode asset for animation " << getName() << ":" << getID() << LL_ENDL;
mAssetStatus = ASSET_FETCH_FAILED;
return STATUS_FAILURE;
}
@ -980,7 +980,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
{
case CONSTRAINT_TARGET_TYPE_GROUND:
target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos);
// llinfos << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl;
// LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
break;
case CONSTRAINT_TARGET_TYPE_BODY:
target_pos = mCharacter->getVolumePos(shared_data->mTargetConstraintVolume, shared_data->mTargetConstraintOffset);
@ -1082,7 +1082,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
// convert intermediate joint positions to world coordinates
positions[joint_num] = ( constraint->mPositions[joint_num] * mPelvisp->getWorldRotation()) + mPelvisp->getWorldPosition();
F32 time_constant = 1.f / clamp_rescale(constraint->mFixupDistanceRMS, 0.f, 0.5f, 0.2f, 8.f);
// llinfos << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl;
// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
positions[joint_num] = lerp(positions[joint_num], kinematic_position,
LLSmoothInterpolation::getInterpolant(time_constant, FALSE));
}
@ -1113,8 +1113,8 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
if ((iteration_count >= MIN_ITERATION_COUNT) &&
(num_joints_finished == shared_data->mChainLength - 1))
{
// llinfos << iteration_count << " iterations on " <<
// mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl;
// LL_INFOS() << iteration_count << " iterations on " <<
// mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
break;
}
}
@ -1230,13 +1230,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackU16(version, "version"))
{
llwarns << "can't read version number" << llendl;
LL_WARNS() << "can't read version number" << LL_ENDL;
return FALSE;
}
if (!dp.unpackU16(sub_version, "sub_version"))
{
llwarns << "can't read sub version number" << llendl;
LL_WARNS() << "can't read sub version number" << LL_ENDL;
return FALSE;
}
@ -1247,16 +1247,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION)
{
#if LL_RELEASE
llwarns << "Bad animation version " << version << "." << sub_version << llendl;
LL_WARNS() << "Bad animation version " << version << "." << sub_version << LL_ENDL;
return FALSE;
#else
llerrs << "Bad animation version " << version << "." << sub_version << llendl;
LL_ERRS() << "Bad animation version " << version << "." << sub_version << LL_ENDL;
#endif
}
if (!dp.unpackS32(temp_priority, "base_priority"))
{
llwarns << "can't read animation base_priority" << llendl;
LL_WARNS() << "can't read animation base_priority" << LL_ENDL;
return FALSE;
}
mJointMotionList->mBasePriority = (LLJoint::JointPriority) temp_priority;
@ -1268,7 +1268,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
}
else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY)
{
llwarns << "bad animation base_priority " << mJointMotionList->mBasePriority << llendl;
LL_WARNS() << "bad animation base_priority " << mJointMotionList->mBasePriority << LL_ENDL;
return FALSE;
}
@ -1277,14 +1277,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
//-------------------------------------------------------------------------
if (!dp.unpackF32(mJointMotionList->mDuration, "duration"))
{
llwarns << "can't read duration" << llendl;
LL_WARNS() << "can't read duration" << LL_ENDL;
return FALSE;
}
if (mJointMotionList->mDuration > MAX_ANIM_DURATION ||
!llfinite(mJointMotionList->mDuration))
{
llwarns << "invalid animation duration" << llendl;
LL_WARNS() << "invalid animation duration" << LL_ENDL;
return FALSE;
}
@ -1293,13 +1293,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
//-------------------------------------------------------------------------
if (!dp.unpackString(mJointMotionList->mEmoteName, "emote_name"))
{
llwarns << "can't read optional_emote_animation" << llendl;
LL_WARNS() << "can't read optional_emote_animation" << LL_ENDL;
return FALSE;
}
if(mJointMotionList->mEmoteName==mID.asString())
{
llwarns << "Malformed animation mEmoteName==mID" << llendl;
LL_WARNS() << "Malformed animation mEmoteName==mID" << LL_ENDL;
return FALSE;
}
@ -1309,20 +1309,20 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackF32(mJointMotionList->mLoopInPoint, "loop_in_point") ||
!llfinite(mJointMotionList->mLoopInPoint))
{
llwarns << "can't read loop point" << llendl;
LL_WARNS() << "can't read loop point" << LL_ENDL;
return FALSE;
}
if (!dp.unpackF32(mJointMotionList->mLoopOutPoint, "loop_out_point") ||
!llfinite(mJointMotionList->mLoopOutPoint))
{
llwarns << "can't read loop point" << llendl;
LL_WARNS() << "can't read loop point" << LL_ENDL;
return FALSE;
}
if (!dp.unpackS32(mJointMotionList->mLoop, "loop"))
{
llwarns << "can't read loop" << llendl;
LL_WARNS() << "can't read loop" << LL_ENDL;
return FALSE;
}
@ -1332,14 +1332,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackF32(mJointMotionList->mEaseInDuration, "ease_in_duration") ||
!llfinite(mJointMotionList->mEaseInDuration))
{
llwarns << "can't read easeIn" << llendl;
LL_WARNS() << "can't read easeIn" << LL_ENDL;
return FALSE;
}
if (!dp.unpackF32(mJointMotionList->mEaseOutDuration, "ease_out_duration") ||
!llfinite(mJointMotionList->mEaseOutDuration))
{
llwarns << "can't read easeOut" << llendl;
LL_WARNS() << "can't read easeOut" << LL_ENDL;
return FALSE;
}
@ -1349,13 +1349,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
U32 word;
if (!dp.unpackU32(word, "hand_pose"))
{
llwarns << "can't read hand pose" << llendl;
LL_WARNS() << "can't read hand pose" << LL_ENDL;
return FALSE;
}
if(word > LLHandMotion::NUM_HAND_POSES)
{
llwarns << "invalid LLHandMotion::eHandPose index: " << word << llendl;
LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word << LL_ENDL;
return FALSE;
}
@ -1367,18 +1367,18 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
U32 num_motions = 0;
if (!dp.unpackU32(num_motions, "num_joints"))
{
llwarns << "can't read number of joints" << llendl;
LL_WARNS() << "can't read number of joints" << LL_ENDL;
return FALSE;
}
if (num_motions == 0)
{
llwarns << "no joints in animation" << llendl;
LL_WARNS() << "no joints in animation" << LL_ENDL;
return FALSE;
}
else if (num_motions > LL_CHARACTER_MAX_JOINTS)
{
llwarns << "too many joints in animation" << llendl;
LL_WARNS() << "too many joints in animation" << LL_ENDL;
return FALSE;
}
@ -1399,13 +1399,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
std::string joint_name;
if (!dp.unpackString(joint_name, "joint_name"))
{
llwarns << "can't read joint name" << llendl;
LL_WARNS() << "can't read joint name" << LL_ENDL;
return FALSE;
}
if (joint_name == "mScreen" || joint_name == "mRoot")
{
llwarns << "attempted to animate special " << joint_name << " joint" << llendl;
LL_WARNS() << "attempted to animate special " << joint_name << " joint" << LL_ENDL;
return FALSE;
}
@ -1415,11 +1415,11 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
LLJoint *joint = mCharacter->getJoint( joint_name );
if (joint)
{
// llinfos << " joint: " << joint_name << llendl;
// LL_INFOS() << " joint: " << joint_name << LL_ENDL;
}
else
{
llwarns << "joint not found: " << joint_name << llendl;
LL_WARNS() << "joint not found: " << joint_name << LL_ENDL;
//return FALSE;
}
@ -1436,13 +1436,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
S32 joint_priority;
if (!dp.unpackS32(joint_priority, "joint_priority"))
{
llwarns << "can't read joint priority." << llendl;
LL_WARNS() << "can't read joint priority." << LL_ENDL;
return FALSE;
}
if (joint_priority < LLJoint::USE_MOTION_PRIORITY)
{
llwarns << "joint priority unknown - too low." << llendl;
LL_WARNS() << "joint priority unknown - too low." << LL_ENDL;
return FALSE;
}
@ -1460,7 +1460,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
//---------------------------------------------------------------------
if (!dp.unpackS32(joint_motion->mRotationCurve.mNumKeys, "num_rot_keys") || joint_motion->mRotationCurve.mNumKeys < 0)
{
llwarns << "can't read number of rotation keys" << llendl;
LL_WARNS() << "can't read number of rotation keys" << LL_ENDL;
return FALSE;
}
@ -1485,7 +1485,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackF32(time, "time") ||
!llfinite(time))
{
llwarns << "can't read rotation key (" << k << ")" << llendl;
LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL;
return FALSE;
}
@ -1494,7 +1494,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
{
if (!dp.unpackU16(time_short, "time"))
{
llwarns << "can't read rotation key (" << k << ")" << llendl;
LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL;
return FALSE;
}
@ -1502,7 +1502,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (time < 0 || time > mJointMotionList->mDuration)
{
llwarns << "invalid frame time" << llendl;
LL_WARNS() << "invalid frame time" << LL_ENDL;
return FALSE;
}
}
@ -1536,13 +1536,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if( !(rot_key.mRotation.isFinite()) )
{
llwarns << "non-finite angle in rotation key" << llendl;
LL_WARNS() << "non-finite angle in rotation key" << LL_ENDL;
success = FALSE;
}
if (!success)
{
llwarns << "can't read rotation key (" << k << ")" << llendl;
LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL;
return FALSE;
}
@ -1554,7 +1554,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
//---------------------------------------------------------------------
if (!dp.unpackS32(joint_motion->mPositionCurve.mNumKeys, "num_pos_keys") || joint_motion->mPositionCurve.mNumKeys < 0)
{
llwarns << "can't read number of position keys" << llendl;
LL_WARNS() << "can't read number of position keys" << LL_ENDL;
return FALSE;
}
@ -1579,7 +1579,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackF32(pos_key.mTime, "time") ||
!llfinite(pos_key.mTime))
{
llwarns << "can't read position key (" << k << ")" << llendl;
LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL;
return FALSE;
}
}
@ -1587,7 +1587,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
{
if (!dp.unpackU16(time_short, "time"))
{
llwarns << "can't read position key (" << k << ")" << llendl;
LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL;
return FALSE;
}
@ -1615,13 +1615,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if( !(pos_key.mPosition.isFinite()) )
{
llwarns << "non-finite position in key" << llendl;
LL_WARNS() << "non-finite position in key" << LL_ENDL;
success = FALSE;
}
if (!success)
{
llwarns << "can't read position key (" << k << ")" << llendl;
LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL;
return FALSE;
}
@ -1642,13 +1642,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
S32 num_constraints = 0;
if (!dp.unpackS32(num_constraints, "num_constraints"))
{
llwarns << "can't read number of constraints" << llendl;
LL_WARNS() << "can't read number of constraints" << LL_ENDL;
return FALSE;
}
if (num_constraints > MAX_CONSTRAINTS || num_constraints < 0)
{
llwarns << "Bad number of constraints... ignoring: " << num_constraints << llendl;
LL_WARNS() << "Bad number of constraints... ignoring: " << num_constraints << LL_ENDL;
}
else
{
@ -1664,7 +1664,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackU8(byte, "chain_length"))
{
llwarns << "can't read constraint chain length" << llendl;
LL_WARNS() << "can't read constraint chain length" << LL_ENDL;
delete constraintp;
return FALSE;
}
@ -1672,21 +1672,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if((U32)constraintp->mChainLength > mJointMotionList->getNumJointMotions())
{
llwarns << "invalid constraint chain length" << llendl;
LL_WARNS() << "invalid constraint chain length" << LL_ENDL;
delete constraintp;
return FALSE;
}
if (!dp.unpackU8(byte, "constraint_type"))
{
llwarns << "can't read constraint type" << llendl;
LL_WARNS() << "can't read constraint type" << LL_ENDL;
delete constraintp;
return FALSE;
}
if( byte >= NUM_CONSTRAINT_TYPES )
{
llwarns << "invalid constraint type" << llendl;
LL_WARNS() << "invalid constraint type" << LL_ENDL;
delete constraintp;
return FALSE;
}
@ -1696,7 +1696,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
U8 bin_data[BIN_DATA_LENGTH+1];
if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "source_volume"))
{
llwarns << "can't read source volume name" << llendl;
LL_WARNS() << "can't read source volume name" << LL_ENDL;
delete constraintp;
return FALSE;
}
@ -1707,21 +1707,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset"))
{
llwarns << "can't read constraint source offset" << llendl;
LL_WARNS() << "can't read constraint source offset" << LL_ENDL;
delete constraintp;
return FALSE;
}
if( !(constraintp->mSourceConstraintOffset.isFinite()) )
{
llwarns << "non-finite constraint source offset" << llendl;
LL_WARNS() << "non-finite constraint source offset" << LL_ENDL;
delete constraintp;
return FALSE;
}
if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume"))
{
llwarns << "can't read target volume name" << llendl;
LL_WARNS() << "can't read target volume name" << LL_ENDL;
delete constraintp;
return FALSE;
}
@ -1741,28 +1741,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset"))
{
llwarns << "can't read constraint target offset" << llendl;
LL_WARNS() << "can't read constraint target offset" << LL_ENDL;
delete constraintp;
return FALSE;
}
if( !(constraintp->mTargetConstraintOffset.isFinite()) )
{
llwarns << "non-finite constraint target offset" << llendl;
LL_WARNS() << "non-finite constraint target offset" << LL_ENDL;
delete constraintp;
return FALSE;
}
if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir"))
{
llwarns << "can't read constraint target direction" << llendl;
LL_WARNS() << "can't read constraint target direction" << LL_ENDL;
delete constraintp;
return FALSE;
}
if( !(constraintp->mTargetConstraintDir.isFinite()) )
{
llwarns << "non-finite constraint target direction" << llendl;
LL_WARNS() << "non-finite constraint target direction" << LL_ENDL;
delete constraintp;
return FALSE;
}
@ -1775,28 +1775,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!dp.unpackF32(constraintp->mEaseInStartTime, "ease_in_start") || !llfinite(constraintp->mEaseInStartTime))
{
llwarns << "can't read constraint ease in start time" << llendl;
LL_WARNS() << "can't read constraint ease in start time" << LL_ENDL;
delete constraintp;
return FALSE;
}
if (!dp.unpackF32(constraintp->mEaseInStopTime, "ease_in_stop") || !llfinite(constraintp->mEaseInStopTime))
{
llwarns << "can't read constraint ease in stop time" << llendl;
LL_WARNS() << "can't read constraint ease in stop time" << LL_ENDL;
delete constraintp;
return FALSE;
}
if (!dp.unpackF32(constraintp->mEaseOutStartTime, "ease_out_start") || !llfinite(constraintp->mEaseOutStartTime))
{
llwarns << "can't read constraint ease out start time" << llendl;
LL_WARNS() << "can't read constraint ease out start time" << LL_ENDL;
delete constraintp;
return FALSE;
}
if (!dp.unpackF32(constraintp->mEaseOutStopTime, "ease_out_stop") || !llfinite(constraintp->mEaseOutStopTime))
{
llwarns << "can't read constraint ease out stop time" << llendl;
LL_WARNS() << "can't read constraint ease out stop time" << LL_ENDL;
delete constraintp;
return FALSE;
}
@ -1816,8 +1816,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
LLJoint* parent = joint->getParent();
if (!parent)
{
llwarns << "Joint with no parent: " << joint->getName()
<< " Emote: " << mJointMotionList->mEmoteName << llendl;
LL_WARNS() << "Joint with no parent: " << joint->getName()
<< " Emote: " << mJointMotionList->mEmoteName << LL_ENDL;
return FALSE;
}
joint = parent;
@ -1828,7 +1828,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if ( !constraint_joint )
{
llwarns << "Invalid joint " << j << llendl;
LL_WARNS() << "Invalid joint " << j << LL_ENDL;
return FALSE;
}
@ -1840,7 +1840,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
}
if (constraintp->mJointStateIndices[i] < 0 )
{
llwarns << "No joint index for constraint " << i << llendl;
LL_WARNS() << "No joint index for constraint " << i << LL_ENDL;
delete constraintp;
return FALSE;
}
@ -2161,7 +2161,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
U8* buffer = new U8[size];
file.read((U8*)buffer, size); /*Flawfinder: ignore*/
lldebugs << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << llendl;
LL_DEBUGS() << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << LL_ENDL;
LLDataPackerBinaryBuffer dp(buffer, size);
if (motionp->deserialize(dp))
@ -2170,7 +2170,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
}
else
{
llwarns << "Failed to decode asset for animation " << motionp->getName() << ":" << motionp->getID() << llendl;
LL_WARNS() << "Failed to decode asset for animation " << motionp->getName() << ":" << motionp->getID() << LL_ENDL;
motionp->mAssetStatus = ASSET_FETCH_FAILED;
}
@ -2178,13 +2178,13 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
}
else
{
llwarns << "Failed to load asset for animation " << motionp->getName() << ":" << motionp->getID() << llendl;
LL_WARNS() << "Failed to load asset for animation " << motionp->getName() << ":" << motionp->getID() << LL_ENDL;
motionp->mAssetStatus = ASSET_FETCH_FAILED;
}
}
else
{
llwarns << "No existing motion for asset data. UUID: " << asset_uuid << llendl;
LL_WARNS() << "No existing motion for asset data. UUID: " << asset_uuid << LL_ENDL;
}
}
@ -2198,9 +2198,9 @@ void LLKeyframeDataCache::dumpDiagInfo()
char buf[1024]; /* Flawfinder: ignore */
llinfos << "-----------------------------------------------------" << llendl;
llinfos << " Global Motion Table (DEBUG only)" << llendl;
llinfos << "-----------------------------------------------------" << llendl;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
LL_INFOS() << " Global Motion Table (DEBUG only)" << LL_ENDL;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
// print each loaded mesh, and it's memory usage
for (keyframe_data_map_t::iterator map_it = sKeyframeDataMap.begin();
@ -2210,18 +2210,18 @@ void LLKeyframeDataCache::dumpDiagInfo()
LLKeyframeMotion::JointMotionList *motion_list_p = map_it->second;
llinfos << "Motion: " << map_it->first << llendl;
LL_INFOS() << "Motion: " << map_it->first << LL_ENDL;
joint_motion_kb = motion_list_p->dumpDiagInfo();
total_size += joint_motion_kb;
}
llinfos << "-----------------------------------------------------" << llendl;
llinfos << "Motions\tTotal Size" << llendl;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
LL_INFOS() << "Motions\tTotal Size" << LL_ENDL;
snprintf(buf, sizeof(buf), "%d\t\t%d bytes", (S32)sKeyframeDataMap.size(), total_size ); /* Flawfinder: ignore */
llinfos << buf << llendl;
llinfos << "-----------------------------------------------------" << llendl;
LL_INFOS() << buf << LL_ENDL;
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
}

View File

@ -168,7 +168,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
{
const ParameterizedMotion& paramMotion = *iter2;
// llinfos << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << llendl;
// LL_INFOS() << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << LL_ENDL;
paramMotion.mMotion->getPose()->setWeight(0.f);
}
}
@ -181,7 +181,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
F32* paramValue = (F32 *)mCharacter->getAnimationData(paramName);
if (NULL == paramValue) // unexpected, but...
{
llwarns << "paramValue == NULL" << llendl;
LL_WARNS() << "paramValue == NULL" << LL_ENDL;
continue;
}
@ -256,8 +256,8 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
firstPose->setWeight(first_weight * weightFactor);
secondPose->setWeight(second_weight * weightFactor);
// llinfos << "Parameter " << *paramName << ": " << *paramValue << llendl;
// llinfos << "Weights " << firstPose->getWeight() << " " << secondPose->getWeight() << llendl;
// LL_INFOS() << "Parameter " << *paramName << ": " << *paramValue << LL_ENDL;
// LL_INFOS() << "Weights " << firstPose->getWeight() << " " << secondPose->getWeight() << LL_ENDL;
}
}
else if (firstMotion && !secondMotion)
@ -269,7 +269,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
// blend poses
mPoseBlender.blendAndApply();
llinfos << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << llendl;
LL_INFOS() << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << LL_ENDL;
return TRUE;
}
@ -356,7 +356,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
apr_file_t* fp = infile.getFileHandle() ;
if (!fp || fileSize == 0)
{
llinfos << "ERROR: can't open: " << path << llendl;
LL_INFOS() << "ERROR: can't open: " << path << LL_ENDL;
return FALSE;
}
@ -395,11 +395,11 @@ BOOL LLKeyframeMotionParam::loadMotions()
if ( error )
{
llinfos << "ERROR: error while reading from " << path << llendl;
LL_INFOS() << "ERROR: error while reading from " << path << LL_ENDL;
return FALSE;
}
llinfos << "Loading parametric keyframe data for: " << getName() << llendl;
LL_INFOS() << "Loading parametric keyframe data for: " << getName() << LL_ENDL;
//-------------------------------------------------------------------------
// parse the text and build keyframe data structures
@ -422,7 +422,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
if (num == 0 || num == EOF) break;
if ((num != 3))
{
llinfos << "WARNING: can't read parametric motion" << llendl;
LL_INFOS() << "WARNING: can't read parametric motion" << LL_ENDL;
return FALSE;
}

View File

@ -119,7 +119,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch
!mKneeRightState ||
!mAnkleRightState )
{
llinfos << getName() << ": Can't find necessary joint states" << llendl;
LL_INFOS() << getName() << ": Can't find necessary joint states" << LL_ENDL;
return STATUS_FAILURE;
}
@ -329,9 +329,9 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
mKneeRightState->setRotation( mKneeRightJoint.getRotation() );
mAnkleRightState->setRotation( mAnkleRightJoint.getRotation() );
//llinfos << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << llendl;
//LL_INFOS() << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << LL_ENDL;
// llinfos << "DEBUG: " << speed << " : " << mTrackAnkles << llendl;
// LL_INFOS() << "DEBUG: " << speed << " : " << mTrackAnkles << LL_ENDL;
return TRUE;
}

View File

@ -163,7 +163,7 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara
mPelvisState->setJoint( mPelvisJoint );
if ( !mPelvisJoint )
{
llwarns << getName() << ": Can't get pelvis joint." << llendl;
LL_WARNS() << getName() << ": Can't get pelvis joint." << LL_ENDL;
return STATUS_FAILURE;
}
@ -350,7 +350,7 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac
mPelvisState->setJoint( pelvisJoint );
if ( !pelvisJoint )
{
llwarns << getName() << ": Can't get pelvis joint." << llendl;
LL_WARNS() << getName() << ": Can't get pelvis joint." << LL_ENDL;
return STATUS_FAILURE;
}

View File

@ -204,10 +204,10 @@ public:
LLMotionBlendType getBlendType() { return NORMAL_BLEND; }
F32 getMinPixelArea() { return 0.f; }
LLMotionInitStatus onInitialize(LLCharacter*) { llinfos << "LLTestMotion::onInitialize()" << llendl; return STATUS_SUCCESS; }
BOOL onActivate() { llinfos << "LLTestMotion::onActivate()" << llendl; return TRUE; }
BOOL onUpdate(F32 time, U8* joint_mask) { llinfos << "LLTestMotion::onUpdate(" << time << ")" << llendl; return TRUE; }
void onDeactivate() { llinfos << "LLTestMotion::onDeactivate()" << llendl; }
LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; }
BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return TRUE; }
BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return TRUE; }
void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; }
};

View File

@ -77,7 +77,7 @@ LLMotionRegistry::~LLMotionRegistry()
//-----------------------------------------------------------------------------
BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
{
// llinfos << "Registering motion: " << name << llendl;
// LL_INFOS() << "Registering motion: " << name << LL_ENDL;
if (!is_in_map(mMotionTable, id))
{
mMotionTable[id] = constructor;
@ -232,7 +232,7 @@ void LLMotionController::purgeExcessMotions()
if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES)
{
LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << llendl;
LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL;
}
}
@ -360,7 +360,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id )
switch(stat)
{
case LLMotion::STATUS_FAILURE:
llinfos << "Motion " << id << " init failed." << llendl;
LL_INFOS() << "Motion " << id << " init failed." << LL_ENDL;
sRegistry.markBad(id);
delete motion;
return NULL;
@ -372,7 +372,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id )
mLoadedMotions.insert(motion);
break;
default:
llerrs << "Invalid initialization status" << llendl;
LL_ERRS() << "Invalid initialization status" << LL_ENDL;
break;
}
@ -418,7 +418,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
return TRUE;
}
// llinfos << "Starting motion " << name << llendl;
// LL_INFOS() << "Starting motion " << name << LL_ENDL;
return activateMotionInstance(motion, mAnimTime - start_offset);
}
@ -781,7 +781,7 @@ void LLMotionController::updateLoadingMotions()
}
else if (status == LLMotion::STATUS_FAILURE)
{
llinfos << "Motion " << motionp->getID() << " init failed." << llendl;
LL_INFOS() << "Motion " << motionp->getID() << " init failed." << LL_ENDL;
sRegistry.markBad(motionp->getID());
mLoadingMotions.erase(curiter);
motion_set_t::iterator found_it = mDeprecatedMotions.find(motionp);
@ -883,7 +883,7 @@ void LLMotionController::updateMotions(bool force_update)
}
mHasRunOnce = TRUE;
// llinfos << "Motion controller time " << motionTimer.getElapsedTimeF32() << llendl;
// LL_INFOS() << "Motion controller time " << motionTimer.getElapsedTimeF32() << LL_ENDL;
}
//-----------------------------------------------------------------------------
@ -1039,7 +1039,7 @@ LLMotion* LLMotionController::findMotion(const LLUUID& id) const
//-----------------------------------------------------------------------------
void LLMotionController::dumpMotions()
{
llinfos << "=====================================" << llendl;
LL_INFOS() << "=====================================" << LL_ENDL;
for (motion_map_t::iterator iter = mAllMotions.begin();
iter != mAllMotions.end(); iter++)
{
@ -1054,7 +1054,7 @@ void LLMotionController::dumpMotions()
state_string += std::string("A");
if (mDeprecatedMotions.find(motion) != mDeprecatedMotions.end())
state_string += std::string("D");
llinfos << gAnimLibrary.animationName(id) << " " << state_string << llendl;
LL_INFOS() << gAnimLibrary.animationName(id) << " " << state_string << LL_ENDL;
}
}
@ -1113,7 +1113,7 @@ void LLMotionController::pauseAllMotions()
{
if (!mPaused)
{
//llinfos << "Pausing animations..." << llendl;
//LL_INFOS() << "Pausing animations..." << LL_ENDL;
mPaused = TRUE;
}
@ -1126,7 +1126,7 @@ void LLMotionController::unpauseAllMotions()
{
if (mPaused)
{
//llinfos << "Unpausing animations..." << llendl;
//LL_INFOS() << "Unpausing animations..." << LL_ENDL;
mPaused = FALSE;
}
}

View File

@ -146,9 +146,9 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
dp.unpackS32(version, "version");
if (version != GESTURE_VERSION)
{
llwarns << "Bad LLMultiGesture version " << version
LL_WARNS() << "Bad LLMultiGesture version " << version
<< " should be " << GESTURE_VERSION
<< llendl;
<< LL_ENDL;
return FALSE;
}
@ -164,7 +164,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
dp.unpackS32(count, "step_count");
if (count < 0)
{
llwarns << "Bad LLMultiGesture step count " << count << llendl;
LL_WARNS() << "Bad LLMultiGesture step count " << count << LL_ENDL;
return FALSE;
}
@ -211,7 +211,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
}
default:
{
llwarns << "Bad LLMultiGesture step type " << type << llendl;
LL_WARNS() << "Bad LLMultiGesture step type " << type << LL_ENDL;
return FALSE;
}
}
@ -221,10 +221,10 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
void LLMultiGesture::dump()
{
llinfos << "key " << S32(mKey) << " mask " << U32(mMask)
LL_INFOS() << "key " << S32(mKey) << " mask " << U32(mMask)
<< " trigger " << mTrigger
<< " replace " << mReplaceText
<< llendl;
<< LL_ENDL;
U32 i;
for (i = 0; i < mSteps.size(); ++i)
{
@ -312,10 +312,10 @@ std::vector<std::string> LLGestureStepAnimation::getLabel() const
void LLGestureStepAnimation::dump()
{
llinfos << "step animation " << mAnimName
LL_INFOS() << "step animation " << mAnimName
<< " id " << mAnimAssetID
<< " flags " << mFlags
<< llendl;
<< LL_ENDL;
}
//---------------------------------------------------------------------------
@ -374,10 +374,10 @@ std::vector<std::string> LLGestureStepSound::getLabel() const
void LLGestureStepSound::dump()
{
llinfos << "step sound " << mSoundName
LL_INFOS() << "step sound " << mSoundName
<< " id " << mSoundAssetID
<< " flags " << mFlags
<< llendl;
<< LL_ENDL;
}
@ -430,9 +430,9 @@ std::vector<std::string> LLGestureStepChat::getLabel() const
void LLGestureStepChat::dump()
{
llinfos << "step chat " << mChatText
LL_INFOS() << "step chat " << mChatText
<< " flags " << mFlags
<< llendl;
<< LL_ENDL;
}
@ -503,7 +503,7 @@ std::vector<std::string> LLGestureStepWait::getLabel() const
void LLGestureStepWait::dump()
{
llinfos << "step wait " << mWaitSeconds
LL_INFOS() << "step wait " << mWaitSeconds
<< " flags " << mFlags
<< llendl;
<< LL_ENDL;
}

View File

@ -88,7 +88,7 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat
Transitions::iterator transition_it = state_transitions->find(&transition);
if (transition_it != state_transitions->end())
{
llerrs << "LLStateTable::addDirectedTransition() : transition already exists" << llendl;
LL_ERRS() << "LLStateTable::addDirectedTransition() : transition already exists" << LL_ENDL;
return FALSE; // transition already exists
}
@ -210,7 +210,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename)
if (!dot_file)
{
llwarns << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << llendl;
LL_WARNS() << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << LL_ENDL;
return FALSE;
}
apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n");
@ -364,7 +364,7 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d
if (NULL == mCurrentState)
{
llwarns << "mCurrentState == NULL; aborting processTransition()" << llendl;
LL_WARNS() << "mCurrentState == NULL; aborting processTransition()" << LL_ENDL;
return;
}
@ -372,7 +372,7 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d
if (NULL == new_state)
{
llwarns << "new_state == NULL; aborting processTransition()" << llendl;
LL_WARNS() << "new_state == NULL; aborting processTransition()" << LL_ENDL;
return;
}
@ -385,9 +385,9 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d
mCurrentState = new_state;
mCurrentState->onEntry(user_data);
#if FSM_PRINT_STATE_TRANSITIONS
llinfos << "Entering state " << mCurrentState->getName() <<
LL_INFOS() << "Entering state " << mCurrentState->getName() <<
" on transition " << transition.getName() << " from state " <<
mLastState->getName() << llendl;
mLastState->getName() << LL_ENDL;
#endif
}
}

View File

@ -80,7 +80,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac
!mTorsoJoint ||
!mRightHandJoint)
{
llwarns << "Invalid skeleton for targeting motion!" << llendl;
LL_WARNS() << "Invalid skeleton for targeting motion!" << LL_ENDL;
return STATUS_FAILURE;
}

View File

@ -79,7 +79,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
mDefaultWeight = llclamp( default_weight, mMinWeight, mMaxWeight );
if( default_weight != mDefaultWeight )
{
llwarns << "value_default attribute is out of range in node " << mName << " " << default_weight << llendl;
LL_WARNS() << "value_default attribute is out of range in node " << mName << " " << default_weight << LL_ENDL;
}
}
@ -101,7 +101,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
}
else
{
llwarns << "Avatar file: <param> has invalid sex attribute: " << sex << llendl;
LL_WARNS() << "Avatar file: <param> has invalid sex attribute: " << sex << LL_ENDL;
return FALSE;
}
@ -109,7 +109,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if( !node->getFastAttributeString( name_string, mName ) )
{
llwarns << "Avatar file: <param> is missing name attribute" << llendl;
LL_WARNS() << "Avatar file: <param> is missing name attribute" << LL_ENDL;
return FALSE;
}
@ -346,7 +346,7 @@ void LLVisualParam::setParamLocation(EParamLocation loc)
}
else
{
lldebugs << "param location is already " << mParamLocation << ", not slamming to " << loc << llendl;
LL_DEBUGS() << "param location is already " << mParamLocation << ", not slamming to " << loc << LL_ENDL;
}
}

View File

@ -59,7 +59,7 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text)
{
// *TODO - determine if there should be some better error state than
// mLines being empty. -brad
llwarns << "invalid heap profile data passed into parser." << llendl;
LL_WARNS() << "invalid heap profile data passed into parser." << LL_ENDL;
return;
}

View File

@ -218,8 +218,8 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
{
if(argv[ii][0] != '-')
{
llinfos << "Did not find option identifier while parsing token: "
<< argv[ii] << llendl;
LL_INFOS() << "Did not find option identifier while parsing token: "
<< argv[ii] << LL_ENDL;
return false;
}
int offset = 1;
@ -303,7 +303,7 @@ void LLApp::setupErrorHandling()
// Install the Google Breakpad crash handler for Windows
if(mExceptionHandler == 0)
{
llwarns << "adding breakpad exception handler" << llendl;
LL_WARNS() << "adding breakpad exception handler" << LL_ENDL;
mExceptionHandler = new google_breakpad::ExceptionHandler(
L"C:\\Temp\\", 0, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL);
}
@ -378,7 +378,7 @@ void LLApp::startErrorThread()
//
if(!mThreadErrorp)
{
llinfos << "Starting error thread" << llendl;
LL_INFOS() << "Starting error thread" << LL_ENDL;
mThreadErrorp = new LLErrorThread();
mThreadErrorp->setUserData((void *) this);
mThreadErrorp->start();
@ -398,7 +398,7 @@ void LLApp::runErrorHandler()
LLApp::sErrorHandler();
}
//llinfos << "App status now STOPPED" << llendl;
//LL_INFOS() << "App status now STOPPED" << LL_ENDL;
LLApp::setStopped();
}
@ -443,7 +443,7 @@ void LLApp::setQuitting()
if (!isExiting())
{
// If we're already exiting, we don't want to reset our state back to quitting.
llinfos << "Setting app state to QUITTING" << llendl;
LL_INFOS() << "Setting app state to QUITTING" << LL_ENDL;
setStatus(APP_STATUS_QUITTING);
}
}
@ -551,7 +551,7 @@ LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *except
if (LLApp::isError())
{
llwarns << "Got another fatal signal while in the error handler, die now!" << llendl;
LL_WARNS() << "Got another fatal signal while in the error handler, die now!" << LL_ENDL;
retval = EXCEPTION_EXECUTE_HANDLER;
return retval;
}
@ -597,7 +597,7 @@ BOOL ConsoleCtrlHandler(DWORD fdwCtrlType)
// We're already trying to die, just ignore this signal
if (LLApp::sLogInSignal)
{
llinfos << "Signal handler - Already trying to quit, ignoring signal!" << llendl;
LL_INFOS() << "Signal handler - Already trying to quit, ignoring signal!" << LL_ENDL;
}
return TRUE;
}
@ -629,8 +629,8 @@ pid_t LLApp::fork()
if( pid < 0 )
{
int system_error = errno;
llwarns << "Unable to fork! Operating system error code: "
<< system_error << llendl;
LL_WARNS() << "Unable to fork! Operating system error code: "
<< system_error << LL_ENDL;
}
else if (pid == 0)
{
@ -643,7 +643,7 @@ pid_t LLApp::fork()
}
else
{
llinfos << "Forked child process " << pid << llendl;
LL_INFOS() << "Forked child process " << pid << LL_ENDL;
}
return pid;
}
@ -735,7 +735,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
if (LLApp::sLogInSignal)
{
llinfos << "Signal handler - Got signal " << signum << " - " << apr_signal_description_get(signum) << llendl;
LL_INFOS() << "Signal handler - Got signal " << signum << " - " << apr_signal_description_get(signum) << LL_ENDL;
}
@ -744,7 +744,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
case SIGCHLD:
if (LLApp::sLogInSignal)
{
llinfos << "Signal handler - Got SIGCHLD from " << info->si_pid << llendl;
LL_INFOS() << "Signal handler - Got SIGCHLD from " << info->si_pid << LL_ENDL;
}
// Check result code for all child procs for which we've
@ -765,7 +765,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
// Abort just results in termination of the app, no funky error handling.
if (LLApp::sLogInSignal)
{
llwarns << "Signal handler - Got SIGABRT, terminating" << llendl;
LL_WARNS() << "Signal handler - Got SIGABRT, terminating" << LL_ENDL;
}
clear_signals();
raise(signum);
@ -775,7 +775,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
case SIGTERM:
if (LLApp::sLogInSignal)
{
llwarns << "Signal handler - Got SIGINT, HUP, or TERM, exiting gracefully" << llendl;
LL_WARNS() << "Signal handler - Got SIGINT, HUP, or TERM, exiting gracefully" << LL_ENDL;
}
// Graceful exit
// Just set our state to quitting, not error
@ -784,7 +784,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
// We're already trying to die, just ignore this signal
if (LLApp::sLogInSignal)
{
llinfos << "Signal handler - Already trying to quit, ignoring signal!" << llendl;
LL_INFOS() << "Signal handler - Already trying to quit, ignoring signal!" << LL_ENDL;
}
return;
}
@ -806,7 +806,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
// Smackdown treated just like any other app termination, for now
if (LLApp::sLogInSignal)
{
llwarns << "Signal handler - Handling smackdown signal!" << llendl;
LL_WARNS() << "Signal handler - Handling smackdown signal!" << LL_ENDL;
}
else
{
@ -820,7 +820,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
if (LLApp::sLogInSignal)
{
llwarns << "Signal handler - Handling fatal signal!" << llendl;
LL_WARNS() << "Signal handler - Handling fatal signal!" << LL_ENDL;
}
if (LLApp::isError())
{
@ -830,7 +830,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
if (LLApp::sLogInSignal)
{
llwarns << "Signal handler - Got another fatal signal while in the error handler, die now!" << llendl;
LL_WARNS() << "Signal handler - Got another fatal signal while in the error handler, die now!" << LL_ENDL;
}
raise(signum);
return;
@ -838,13 +838,13 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
if (LLApp::sLogInSignal)
{
llwarns << "Signal handler - Flagging error status and waiting for shutdown" << llendl;
LL_WARNS() << "Signal handler - Flagging error status and waiting for shutdown" << LL_ENDL;
}
if (LLApp::isCrashloggerDisabled()) // Don't gracefully handle any signal, crash and core for a gdb post mortem
{
clear_signals();
llwarns << "Fatal signal received, not handling the crash here, passing back to operating system" << llendl;
LL_WARNS() << "Fatal signal received, not handling the crash here, passing back to operating system" << LL_ENDL;
raise(signum);
return;
}
@ -859,7 +859,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
if (LLApp::sLogInSignal)
{
llwarns << "Signal handler - App is stopped, reraising signal" << llendl;
LL_WARNS() << "Signal handler - App is stopped, reraising signal" << LL_ENDL;
}
clear_signals();
raise(signum);
@ -867,7 +867,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
} else {
if (LLApp::sLogInSignal)
{
llinfos << "Signal handler - Unhandled signal " << signum << ", ignoring!" << llendl;
LL_INFOS() << "Signal handler - Unhandled signal " << signum << ", ignoring!" << LL_ENDL;
}
}
}
@ -896,7 +896,7 @@ bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_
--remaining;
}
llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl;
LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
LLApp::runErrorHandler();
#ifndef LL_RELEASE_FOR_DOWNLOAD
@ -942,7 +942,7 @@ bool unix_post_minidump_callback(const char *dump_dir,
strncpy(path, ".dmp", remaining);
}
llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl;
LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
LLApp::runErrorHandler();
#ifndef LL_RELEASE_FOR_DOWNLOAD
@ -985,16 +985,16 @@ bool windows_post_minidump_callback(const wchar_t* dump_path,
strncpy(path, ".dmp", remaining);
}
llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl;
LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
// *NOTE:Mani - this code is stolen from LLApp, where its never actually used.
//OSMessageBox("Attach Debugger Now", "Error", OSMB_OK);
// *TODO: Translate the signals/exceptions into cross-platform stuff
// Windows implementation
llinfos << "Entering Windows Exception Handler..." << llendl;
LL_INFOS() << "Entering Windows Exception Handler..." << LL_ENDL;
if (LLApp::isError())
{
llwarns << "Got another fatal signal while in the error handler, die now!" << llendl;
LL_WARNS() << "Got another fatal signal while in the error handler, die now!" << LL_ENDL;
}
// Flag status to error, so thread_error starts its work

View File

@ -446,7 +446,7 @@ S32 LLAPRFile::read(void *buf, S32 nbytes)
{
if(!mFile)
{
llwarns << "apr mFile is removed by somebody else. Can not read." << llendl ;
LL_WARNS() << "apr mFile is removed by somebody else. Can not read." << LL_ENDL ;
return 0;
}
@ -468,7 +468,7 @@ S32 LLAPRFile::write(const void *buf, S32 nbytes)
{
if(!mFile)
{
llwarns << "apr mFile is removed by somebody else. Can not write." << llendl ;
LL_WARNS() << "apr mFile is removed by somebody else. Can not write." << LL_ENDL ;
return 0;
}

View File

@ -231,8 +231,8 @@ std::string LLBase32::encode(const U8* input, size_t input_size)
size_t encoded = base32_encode(&output[0], output_size, input, input_size);
llinfos << "encoded " << encoded << " into buffer of size "
<< output_size << llendl;
LL_INFOS() << "encoded " << encoded << " into buffer of size "
<< output_size << LL_ENDL;
}
return output;
}

View File

@ -165,8 +165,8 @@ public:
#ifdef _DEBUG
if (mBufferSize > mMaxSize)
{
llerrs << "mBufferSize exceeding mMaxSize" << llendl;
llerrs << mBufferSize << " > " << mMaxSize << llendl;
LL_ERRS() << "mBufferSize exceeding mMaxSize" << LL_ENDL;
LL_ERRS() << mBufferSize << " > " << mMaxSize << LL_ENDL;
}
#endif
mLoad = *(mBuffer + mBufferSize++);

View File

@ -162,7 +162,7 @@ void LLCRC::update(const std::string& filename)
{
if (filename.empty())
{
llerrs << "No filename specified" << llendl;
LL_ERRS() << "No filename specified" << LL_ENDL;
return;
}
@ -185,7 +185,7 @@ void LLCRC::update(const std::string& filename)
if (nread < (size_t) size)
{
llwarns << "Short read on " << filename << llendl;
LL_WARNS() << "Short read on " << filename << LL_ENDL;
}
update(data, nread);

View File

@ -41,7 +41,7 @@
// crc.update(fgetc(fp));
// }
// fclose(fp);
// llinfos << "File crc: " << crc.getCRC() << llendl;
// LL_INFOS() << "File crc: " << crc.getCRC() << LL_ENDL;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LL_COMMON_API LLCRC

View File

@ -63,8 +63,8 @@ LLDate::LLDate(const std::string& iso8601_date)
{
if(!fromString(iso8601_date))
{
llwarns << "date " << iso8601_date << " failed to parse; "
<< "ZEROING IT OUT" << llendl;
LL_WARNS() << "date " << iso8601_date << " failed to parse; "
<< "ZEROING IT OUT" << LL_ENDL;
mSecondsSinceEpoch = DATE_EPOCH;
}
}

View File

@ -89,7 +89,7 @@ protected:
{
if (lookup(index))
{
llerrs << "Dictionary entry already added (attempted to add duplicate entry)" << llendl;
LL_ERRS() << "Dictionary entry already added (attempted to add duplicate entry)" << LL_ENDL;
}
(*this)[index] = entry;
}

View File

@ -51,7 +51,26 @@
#include "lltimer.h"
namespace {
#if !LL_WINDOWS
#if LL_WINDOWS
void debugger_print(const std::string& s)
{
// Be careful when calling OutputDebugString as it throws DBG_PRINTEXCEPTION_C
// which works just fine under the windows debugger, but can cause users who
// have enabled SEHOP exception chain validation to crash due to interactions
// between the Win 32-bit exception handling and boost coroutine fiber stacks. BUG-2707
//
if (IsDebuggerPresent())
{
// Need UTF16 for Unicode OutputDebugString
//
if (s.size())
{
OutputDebugString(utf8str_to_utf16str(s).c_str());
OutputDebugString(TEXT("\n"));
}
}
}
#else
class RecordToSyslog : public LLError::Recorder
{
public:
@ -98,6 +117,7 @@ namespace {
{
LL_INFOS() << "Error setting log file to " << filename << LL_ENDL;
}
mWantsTime = true;
}
~RecordToFile()
@ -107,8 +127,6 @@ namespace {
bool okay() { return mFile; }
virtual bool wantsTime() { return true; }
virtual void recordMessage(LLError::ELevel level,
const std::string& message)
{
@ -123,10 +141,11 @@ namespace {
class RecordToStderr : public LLError::Recorder
{
public:
RecordToStderr(bool timestamp) : mTimestamp(timestamp), mUseANSI(ANSI_PROBE) { }
RecordToStderr(bool timestamp) : mUseANSI(ANSI_PROBE)
{
mWantsTime = timestamp;
}
virtual bool wantsTime() { return mTimestamp; }
virtual void recordMessage(LLError::ELevel level,
const std::string& message)
{
@ -156,7 +175,6 @@ namespace {
}
private:
bool mTimestamp;
enum ANSIState
{
ANSI_PROBE,
@ -202,10 +220,13 @@ namespace {
class RecordToWinDebug: public LLError::Recorder
{
public:
RecordToWinDebug()
{}
virtual void recordMessage(LLError::ELevel level,
const std::string& message)
{
LL_WINDOWS_OUTPUT_DEBUG(message);
debugger_print(message);
}
};
#endif
@ -217,7 +238,7 @@ namespace
std::string className(const std::type_info& type)
{
#ifdef __GNUC__
// GCC: type_info::name() returns a mangled class name, must demangle
// GCC: type_info::name() returns a mangled class name,st demangle
static size_t abi_name_len = 100;
static char* abi_name_buf = (char*)malloc(abi_name_len);
@ -321,9 +342,9 @@ namespace
if (configuration.isUndefined())
{
llwarns << filename() << " missing, ill-formed,"
LL_WARNS() << filename() << " missing, ill-formed,"
" or simply undefined; not changing configuration"
<< llendl;
<< LL_ENDL;
return false;
}
}
@ -394,25 +415,25 @@ namespace LLError
class Settings
{
public:
bool printLocation;
bool mPrintLocation;
LLError::ELevel defaultLevel;
LevelMap functionLevelMap;
LevelMap classLevelMap;
LevelMap fileLevelMap;
LevelMap tagLevelMap;
std::map<std::string, unsigned int> uniqueLogMessages;
LLError::FatalFunction crashFunction;
LLError::TimeFunction timeFunction;
Recorders recorders;
Recorder* fileRecorder;
Recorder* fixedBufferRecorder;
std::string fileRecorderFileName;
int shouldLogCallCounter;
LLError::ELevel mDefaultLevel;
LevelMap mFunctionLevelMap;
LevelMap mClassLevelMap;
LevelMap mFileLevelMap;
LevelMap mTagLevelMap;
std::map<std::string, unsigned int> mUniqueLogMessages;
LLError::FatalFunction mCrashFunction;
LLError::TimeFunction mTimeFunction;
Recorders mRecorders;
Recorder* mFileRecorder;
Recorder* mFixedBufferRecorder;
std::string mFileRecorderFileName;
int mShouldLogCallCounter;
static Settings& get();
@ -422,18 +443,18 @@ namespace LLError
private:
Settings()
: printLocation(false),
defaultLevel(LLError::LEVEL_DEBUG),
crashFunction(),
timeFunction(NULL),
fileRecorder(NULL),
fixedBufferRecorder(NULL),
shouldLogCallCounter(0)
{ }
: mPrintLocation(false),
mDefaultLevel(LLError::LEVEL_DEBUG),
mCrashFunction(),
mTimeFunction(NULL),
mFileRecorder(NULL),
mFixedBufferRecorder(NULL),
mShouldLogCallCounter(NULL)
{}
~Settings()
{
for_each(recorders.begin(), recorders.end(),
for_each(mRecorders.begin(), mRecorders.end(),
DeletePointer());
}
@ -494,8 +515,8 @@ namespace LLError
const std::type_info& class_info,
const char* function,
bool printOnce,
const char* broadTag,
const char* narrowTag)
const char** tags,
size_t tag_count)
: mLevel(level),
mFile(file),
mLine(line),
@ -504,37 +525,53 @@ namespace LLError
mCached(false),
mShouldLog(false),
mPrintOnce(printOnce),
mBroadTag(broadTag),
mNarrowTag(narrowTag)
{}
CallSite::CallSite(ELevel level,
const char* file,
int line,
const std::type_info& class_info,
const char* function,
bool printOnce,
const char* broadTag,
const char* narrowTag,
const char*,
...)
: mLevel(level),
mFile(file),
mLine(line),
mClassInfo(class_info),
mFunction(function),
mCached(false),
mShouldLog(false),
mPrintOnce(printOnce),
mBroadTag(broadTag),
mNarrowTag(narrowTag)
mTags(new const char* [tag_count]),
mTagCount(tag_count)
{
LL_ERRS() << "No support for more than 2 logging tags" << LL_ENDL;
for (int i = 0; i < tag_count; i++)
{
mTags[i] = tags[i];
}
switch (mLevel)
{
case LEVEL_DEBUG: mLevelString = "DEBUG:"; break;
case LEVEL_INFO: mLevelString = "INFO:"; break;
case LEVEL_WARN: mLevelString = "WARNING:"; break;
case LEVEL_ERROR: mLevelString = "ERROR:"; break;
default: mLevelString = "XXX:"; break;
};
mLocationString = llformat("%s(%d) :", abbreviateFile(mFile).c_str(), mLine);
#if LL_WINDOWS
// DevStudio: __FUNCTION__ already includes the full class name
#else
#if LL_LINUX
// gross, but typeid comparison seems to always fail here with gcc4.1
if (0 != strcmp(site.mClassInfo.name(), typeid(NoClassInfo).name()))
#else
if (site.mClassInfo != typeid(NoClassInfo))
#endif // LL_LINUX
{
mFunctionString = className(site.mClassInfo) + "::";
}
#endif
mFunctionString += std::string(mFunction) + ":";
for (size_t i = 0; i < mTagCount; i++)
{
mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? "" : " ");
}
}
CallSite::~CallSite()
{
delete []mTags;
}
void CallSite::invalidate()
{ mCached = false; }
{
mCached = false;
}
}
namespace
@ -620,25 +657,25 @@ namespace LLError
void setPrintLocation(bool print)
{
Settings& s = Settings::get();
s.printLocation = print;
s.mPrintLocation = print;
}
void setFatalFunction(const FatalFunction& f)
{
Settings& s = Settings::get();
s.crashFunction = f;
s.mCrashFunction = f;
}
FatalFunction getFatalFunction()
{
Settings& s = Settings::get();
return s.crashFunction;
return s.mCrashFunction;
}
void setTimeFunction(TimeFunction f)
{
Settings& s = Settings::get();
s.timeFunction = f;
s.mTimeFunction = f;
}
void setDefaultLevel(ELevel level)
@ -646,13 +683,13 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
g.invalidateCallSites();
s.defaultLevel = level;
s.mDefaultLevel = level;
}
ELevel getDefaultLevel()
{
Settings& s = Settings::get();
return s.defaultLevel;
return s.mDefaultLevel;
}
void setFunctionLevel(const std::string& function_name, ELevel level)
@ -660,7 +697,7 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
g.invalidateCallSites();
s.functionLevelMap[function_name] = level;
s.mFunctionLevelMap[function_name] = level;
}
void setClassLevel(const std::string& class_name, ELevel level)
@ -668,7 +705,7 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
g.invalidateCallSites();
s.classLevelMap[class_name] = level;
s.mClassLevelMap[class_name] = level;
}
void setFileLevel(const std::string& file_name, ELevel level)
@ -676,7 +713,7 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
g.invalidateCallSites();
s.fileLevelMap[file_name] = level;
s.mFileLevelMap[file_name] = level;
}
void setTagLevel(const std::string& tag_name, ELevel level)
@ -684,7 +721,7 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
g.invalidateCallSites();
s.tagLevelMap[tag_name] = level;
s.mTagLevelMap[tag_name] = level;
}
LLError::ELevel decodeLevel(std::string name)
@ -732,11 +769,11 @@ namespace LLError
Settings& s = Settings::get();
g.invalidateCallSites();
s.functionLevelMap.clear();
s.classLevelMap.clear();
s.fileLevelMap.clear();
s.tagLevelMap.clear();
s.uniqueLogMessages.clear();
s.mFunctionLevelMap.clear();
s.mClassLevelMap.clear();
s.mFileLevelMap.clear();
s.mTagLevelMap.clear();
s.mUniqueLogMessages.clear();
setPrintLocation(config["print-location"]);
setDefaultLevel(decodeLevel(config["default-level"]));
@ -749,10 +786,10 @@ namespace LLError
ELevel level = decodeLevel(entry["level"]);
setLevels(s.functionLevelMap, entry["functions"], level);
setLevels(s.classLevelMap, entry["classes"], level);
setLevels(s.fileLevelMap, entry["files"], level);
setLevels(s.tagLevelMap, entry["tags"], level);
setLevels(s.mFunctionLevelMap, entry["functions"], level);
setLevels(s.mClassLevelMap, entry["classes"], level);
setLevels(s.mFileLevelMap, entry["files"], level);
setLevels(s.mTagLevelMap, entry["tags"], level);
}
}
}
@ -760,19 +797,44 @@ namespace LLError
namespace LLError
{
Recorder::Recorder()
: mWantsTime(false),
mWantsTags(false),
mWantsLevel(true),
mWantsLocation(false),
mWantsFunctionName(true)
{}
Recorder::~Recorder()
{}
// virtual
bool Recorder::wantsTime()
{
return false;
return mWantsTime;
}
// virtual
bool Recorder::wantsTags()
{
return false;
return mWantsTags;
}
// virtual
bool Recorder::wantsLevel()
{
return mWantsLevel;
}
// virtual
bool Recorder::wantsLocation()
{
return mWantsLocation;
}
// virtual
bool Recorder::wantsFunctionName()
{
return mWantsFunctionName;
}
void addRecorder(Recorder* recorder)
@ -782,7 +844,7 @@ namespace LLError
return;
}
Settings& s = Settings::get();
s.recorders.push_back(recorder);
s.mRecorders.push_back(recorder);
}
void removeRecorder(Recorder* recorder)
@ -792,8 +854,8 @@ namespace LLError
return;
}
Settings& s = Settings::get();
s.recorders.erase(std::remove(s.recorders.begin(), s.recorders.end(), recorder),
s.recorders.end());
s.mRecorders.erase(std::remove(s.mRecorders.begin(), s.mRecorders.end(), recorder),
s.mRecorders.end());
}
}
@ -803,10 +865,10 @@ namespace LLError
{
LLError::Settings& s = LLError::Settings::get();
removeRecorder(s.fileRecorder);
delete s.fileRecorder;
s.fileRecorder = NULL;
s.fileRecorderFileName.clear();
removeRecorder(s.mFileRecorder);
delete s.mFileRecorder;
s.mFileRecorder = NULL;
s.mFileRecorderFileName.clear();
if (file_name.empty())
{
@ -820,8 +882,8 @@ namespace LLError
return;
}
s.fileRecorderFileName = file_name;
s.fileRecorder = f;
s.mFileRecorderFileName = file_name;
s.mFileRecorder = f;
addRecorder(f);
}
@ -829,132 +891,114 @@ namespace LLError
{
LLError::Settings& s = LLError::Settings::get();
removeRecorder(s.fixedBufferRecorder);
delete s.fixedBufferRecorder;
s.fixedBufferRecorder = NULL;
removeRecorder(s.mFixedBufferRecorder);
delete s.mFixedBufferRecorder;
s.mFixedBufferRecorder = NULL;
if (!fixedBuffer)
{
return;
}
s.fixedBufferRecorder = new RecordToFixedBuffer(fixedBuffer);
addRecorder(s.fixedBufferRecorder);
s.mFixedBufferRecorder = new RecordToFixedBuffer(fixedBuffer);
addRecorder(s.mFixedBufferRecorder);
}
std::string logFileName()
{
LLError::Settings& s = LLError::Settings::get();
return s.fileRecorderFileName;
return s.mFileRecorderFileName;
}
}
namespace
{
void writeToRecorders(const LLError::CallSite& site, const std::string& message)
void writeToRecorders(const LLError::CallSite& site, const std::string& message, bool show_location = true, bool show_time = true, bool show_tags = true, bool show_level = true, bool show_function = true)
{
LLError::ELevel level = site.mLevel;
LLError::Settings& s = LLError::Settings::get();
std::string messageWithTime;
std::string messageWithTags;
std::string messageWithTagsAndTime;
for (Recorders::const_iterator i = s.recorders.begin();
i != s.recorders.end();
for (Recorders::const_iterator i = s.mRecorders.begin();
i != s.mRecorders.end();
++i)
{
LLError::Recorder* r = *i;
std::ostringstream message_stream;
if (show_location && (r->wantsLocation() || level == LLError::LEVEL_ERROR || s.mPrintLocation))
{
message_stream << site.mLocationString << " ";
}
if (show_time && r->wantsTime() && s.mTimeFunction != NULL)
{
message_stream << s.mTimeFunction() << " ";
}
if (show_tags && r->wantsTags())
{
message_stream << site.mTagString << " ";
}
if (show_level && r->wantsLevel())
{
message_stream << site.mLevelString << " ";
}
if (r->wantsTime() && s.timeFunction != NULL)
if (show_function && r->wantsFunctionName())
{
if (r->wantsTags())
{
if (messageWithTagsAndTime.empty())
{
messageWithTagsAndTime = s.timeFunction() + " "
+ (site.mBroadTag ? (std::string("#") + std::string(site.mBroadTag) + " ") : std::string())
+ (site.mNarrowTag ? (std::string("#") + std::string(site.mNarrowTag) + " ") : std::string())
+ message;
}
r->recordMessage(level, messageWithTagsAndTime);
}
else
{
if (messageWithTime.empty())
{
messageWithTime = s.timeFunction() + " " + message;
}
r->recordMessage(level, messageWithTime);
}
message_stream << site.mFunctionString << " ";
}
else
{
if (r->wantsTags())
{
if (messageWithTags.empty())
{
messageWithTags = (site.mBroadTag ? (std::string("#") + std::string(site.mBroadTag) + " ") : std::string())
+ (site.mNarrowTag ? (std::string("#") + std::string(site.mNarrowTag) + " ") : std::string())
+ message;
}
r->recordMessage(level, messageWithTags);
}
else
{
r->recordMessage(level, message);
}
}
message_stream << message;
r->recordMessage(level, message_stream.str());
}
}
}
/*
Recorder formats:
$type = "ERROR" | "WARNING" | "ALERT" | "INFO" | "DEBUG"
$loc = "$file($line)"
$msg = "$loc : " if FATAL or printing loc
"" otherwise
$msg += "$type: "
$msg += contents of stringstream
$time = "%Y-%m-%dT%H:%M:%SZ" if UTC
or "%Y-%m-%dT%H:%M:%S %Z" if local
syslog: "$msg"
file: "$time $msg\n"
stderr: "$time $msg\n" except on windows, "$msg\n"
fixedbuf: "$msg"
winddebug: "$msg\n"
Note: if FATAL, an additional line gets logged first, with $msg set to
"$loc : error"
You get:
llfoo.cpp(42) : error
llfoo.cpp(42) : ERROR: something
*/
namespace {
bool checkLevelMap(const LevelMap& map, const std::string& key,
LLError::ELevel& level)
{
bool stop_checking;
LevelMap::const_iterator i = map.find(key);
if (i == map.end())
{
return false;
return stop_checking = false;
}
level = i->second;
return true;
level = i->second;
return stop_checking = true;
}
bool checkLevelMap( const LevelMap& map,
const char *const * keys,
size_t count,
LLError::ELevel& level)
{
bool found_level = false;
LLError::ELevel tag_level = LLError::LEVEL_NONE;
for (size_t i = 0; i < count; i++)
{
LevelMap::const_iterator it = map.find(keys[i]);
if (it != map.end())
{
found_level = true;
tag_level = llmin(tag_level, it->second);
}
}
if (found_level)
{
level = tag_level;
}
return found_level;
}
class LogLock
{
public:
@ -1019,10 +1063,10 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
s.shouldLogCallCounter += 1;
std::string class_name = className(site.mClassInfo);
std::string function_name = functionName(site.mFunction);
s.mShouldLogCallCounter++;
std::string& class_name = className(site.mClassInfo);
std::string& function_name = functionName(site.mFunction);
#if LL_LINUX
// gross, but typeid comparison seems to always fail here with gcc4.1
if (0 != strcmp(site.mClassInfo.name(), typeid(NoClassInfo).name()))
@ -1033,17 +1077,18 @@ namespace LLError
function_name = class_name + "::" + function_name;
}
ELevel compareLevel = s.defaultLevel;
ELevel compareLevel = s.mDefaultLevel;
// The most specific match found will be used as the log level,
// since the computation short circuits.
// So, in increasing order of importance:
// Default < Broad Tag < File < Class < Function < Narrow Tag
((site.mNarrowTag != NULL) ? checkLevelMap(s.tagLevelMap, site.mNarrowTag, compareLevel) : false)
|| checkLevelMap(s.functionLevelMap, function_name, compareLevel)
|| checkLevelMap(s.classLevelMap, class_name, compareLevel)
|| checkLevelMap(s.fileLevelMap, abbreviateFile(site.mFile), compareLevel)
|| ((site.mBroadTag != NULL) ? checkLevelMap(s.tagLevelMap, site.mBroadTag, compareLevel) : false);
// Default < Tags < File < Class < Function
checkLevelMap(s.mFunctionLevelMap, function_name, compareLevel)
|| checkLevelMap(s.mClassLevelMap, class_name, compareLevel)
|| checkLevelMap(s.mFileLevelMap, abbreviateFile(site.mFile), compareLevel)
|| (site.mTagCount > 0
? checkLevelMap(s.mTagLevelMap, site.mTags, site.mTagCount, compareLevel)
: false);
site.mCached = true;
g.addCallSite(site);
@ -1126,56 +1171,21 @@ namespace LLError
if (site.mLevel == LEVEL_ERROR)
{
std::ostringstream fatalMessage;
fatalMessage << abbreviateFile(site.mFile)
<< "(" << site.mLine << ") : error";
writeToRecorders(site, fatalMessage.str());
writeToRecorders(site, "error", true, true, true, false, false);
}
std::ostringstream message_stream;
std::ostringstream prefix;
switch (site.mLevel)
{
case LEVEL_DEBUG: prefix << "DEBUG: "; break;
case LEVEL_INFO: prefix << "INFO: "; break;
case LEVEL_WARN: prefix << "WARNING: "; break;
case LEVEL_ERROR: prefix << "ERROR: "; break;
default: prefix << "XXX: "; break;
};
if (s.printLocation)
{
prefix << abbreviateFile(site.mFile)
<< "(" << site.mLine << ") : ";
}
#if LL_WINDOWS
// DevStudio: __FUNCTION__ already includes the full class name
#else
#if LL_LINUX
// gross, but typeid comparison seems to always fail here with gcc4.1
if (0 != strcmp(site.mClassInfo.name(), typeid(NoClassInfo).name()))
#else
if (site.mClassInfo != typeid(NoClassInfo))
#endif // LL_LINUX
{
prefix << className(site.mClassInfo) << "::";
}
#endif
prefix << site.mFunction << ": ";
if (site.mPrintOnce)
{
std::map<std::string, unsigned int>::iterator messageIter = s.uniqueLogMessages.find(message);
if (messageIter != s.uniqueLogMessages.end())
std::map<std::string, unsigned int>::iterator messageIter = s.mUniqueLogMessages.find(message);
if (messageIter != s.mUniqueLogMessages.end())
{
messageIter->second++;
unsigned int num_messages = messageIter->second;
if (num_messages == 10 || num_messages == 50 || (num_messages % 100) == 0)
{
prefix << "ONCE (" << num_messages << "th time seen): ";
message_stream << "ONCE (" << num_messages << "th time seen): ";
}
else
{
@ -1184,26 +1194,22 @@ namespace LLError
}
else
{
prefix << "ONCE: ";
s.uniqueLogMessages[message] = 1;
message_stream << "ONCE: ";
s.mUniqueLogMessages[message] = 1;
}
}
prefix << message;
message = prefix.str();
message_stream << message;
writeToRecorders(site, message);
writeToRecorders(site, message_stream.str());
if (site.mLevel == LEVEL_ERROR && s.crashFunction)
if (site.mLevel == LEVEL_ERROR && s.mCrashFunction)
{
s.crashFunction(message);
s.mCrashFunction(message_stream.str());
}
}
}
namespace LLError
{
Settings* saveAndResetSettings()
@ -1260,7 +1266,7 @@ namespace LLError
int shouldLogCallCount()
{
Settings& s = Settings::get();
return s.shouldLogCallCounter;
return s.mShouldLogCallCounter;
}
#if LL_WINDOWS
@ -1471,26 +1477,5 @@ namespace LLError
sIndex = 0;
}
#if LL_WINDOWS
void LLOutputDebugUTF8(const std::string& s)
{
// Be careful when calling OutputDebugString as it throws DBG_PRINTEXCEPTION_C
// which works just fine under the windows debugger, but can cause users who
// have enabled SEHOP exception chain validation to crash due to interactions
// between the Win 32-bit exception handling and boost coroutine fiber stacks. BUG-2707
//
if (IsDebuggerPresent())
{
// Need UTF16 for Unicode OutputDebugString
//
if (s.size())
{
OutputDebugString(utf8str_to_utf16str(s).c_str());
OutputDebugString(TEXT("\n"));
}
}
}
#endif
}

View File

@ -194,14 +194,26 @@ namespace LLError
// Represents a specific place in the code where a message is logged
// This is public because it is used by the macros below. It is not
// intended for public use.
CallSite(ELevel, const char* file, int line,
const std::type_info& class_info, const char* function, bool printOnce, const char* broadTag = NULL, const char* narrowTag = NULL );
CallSite(ELevel level,
const char* file,
int line,
const std::type_info& class_info,
const char* function,
bool print_once,
const char** tags,
size_t tag_count);
~CallSite();
#ifdef LL_LIBRARY_INCLUDE
bool shouldLog();
#else // LL_LIBRARY_INCLUDE
bool shouldLog()
{ return mCached ? mShouldLog : Log::shouldLog(*this); }
{
return mCached
? mShouldLog
: Log::shouldLog(*this);
}
// this member function needs to be in-line for efficiency
#endif // LL_LIBRARY_INCLUDE
@ -213,20 +225,17 @@ namespace LLError
const int mLine;
const std::type_info& mClassInfo;
const char* const mFunction;
const char* const mBroadTag;
const char* const mNarrowTag;
const char** mTags;
size_t mTagCount;
const bool mPrintOnce;
// these implement a cache of the call to shouldLog()
bool mCached;
bool mShouldLog;
const char* mLevelString;
std::string mLocationString,
mFunctionString,
mTagString;
bool mCached,
mShouldLog;
friend class Log;
private:
// 3 or more tags not currently supported
CallSite(ELevel, const char* file, int line,
const std::type_info& class_info, const char* function, bool printOnce, const char* broadTag, const char* narrowTag, const char*, ...);
};
@ -258,30 +267,21 @@ namespace LLError
static void clear() ;
static void end(std::ostringstream* _out) ;
};
#if LL_WINDOWS
void LLOutputDebugUTF8(const std::string& s);
#endif
}
#if LL_WINDOWS
// Macro accepting a std::string for display in windows debugging console
#define LL_WINDOWS_OUTPUT_DEBUG(a) LLError::LLOutputDebugUTF8(a)
#else
#define LL_WINDOWS_OUTPUT_DEBUG(a)
#endif
//this is cheaper than llcallstacks if no need to output other variables to call stacks.
#define LL_PUSH_CALLSTACKS() LLError::LLCallStacks::push(__FUNCTION__, __LINE__)
#define llcallstacks \
{\
#define llcallstacks \
{ \
std::ostringstream* _out = LLError::LLCallStacks::insert(__FUNCTION__, __LINE__) ; \
(*_out)
#define llcallstacksendl \
LLError::End(); \
#define llcallstacksendl \
LLError::End(); \
LLError::LLCallStacks::end(_out) ; \
}
#define LL_CLEAR_CALLSTACKS() LLError::LLCallStacks::clear()
#define LL_PRINT_CALLSTACKS() LLError::LLCallStacks::print()
@ -302,13 +302,18 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// See top of file for common usage.
/////////////////////////////////
#define lllog(level, once, ...) \
do { \
static LLError::CallSite _site( \
level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), __FUNCTION__, once, ##__VA_ARGS__ );\
if (LL_UNLIKELY(_site.shouldLog())) \
{ \
std::ostringstream* _out = LLError::Log::out(); \
// this macro uses a one-shot do statement to avoid parsing errors when writing:
// if (condition) LL_INFOS() << "True" << LLENDL; else LLINFOS() << "False" << LLENDL
#define lllog(level, once, ...) \
do { \
const char* tags[] = {"", ##__VA_ARGS__}; \
size_t tag_count = LL_ARRAY_SIZE(tags) - 1; \
static LLError::CallSite _site( \
level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), __FUNCTION__, once, &tags[1], tag_count);\
if (LL_UNLIKELY(_site.shouldLog())) \
{ \
std::ostringstream* _out = LLError::Log::out(); \
(*_out)
//Use this construct if you need to do computation in the middle of a
@ -350,11 +355,11 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// DEPRECATED: Use the new macros that allow tags and *look* like macros.
#define lldebugs LL_DEBUGS()
//#define lldebugs LL_DEBUGS()
#define llinfos LL_INFOS()
#define llwarns LL_WARNS()
#define llerrs LL_ERRS()
#define llcont LL_CONT
//#define llwarns LL_WARNS()
//#define llerrs LL_ERRS()
//#define llcont LL_CONT
#define llendl LL_ENDL
#endif // LL_LLERROR_H

View File

@ -136,18 +136,24 @@ namespace LLError
{
// An object that handles the actual output or error messages.
public:
Recorder();
virtual ~Recorder();
virtual void recordMessage(LLError::ELevel, const std::string& message) = 0;
// use the level for better display, not for filtering
virtual bool wantsTime(); // default returns false
// override and return true if the recorder wants the time string
// included in the text of the message
bool wantsTime();
bool wantsTags();
bool wantsLevel();
bool wantsLocation();
bool wantsFunctionName();
virtual bool wantsTags(); // default returns false
// override ands return true if the recorder wants the tags included
// in the text of the message
protected:
bool mWantsTime,
mWantsTags,
mWantsLevel,
mWantsLocation,
mWantsFunctionName;
};
/**

View File

@ -65,7 +65,7 @@ void get_child_status(const int waitpid_status, int &process_status, bool &exite
exited = true;
if (do_logging)
{
llinfos << "get_child_status - Child exited cleanly with return of " << process_status << llendl;
LL_INFOS() << "get_child_status - Child exited cleanly with return of " << process_status << LL_ENDL;
}
return;
}
@ -75,15 +75,15 @@ void get_child_status(const int waitpid_status, int &process_status, bool &exite
exited = true;
if (do_logging)
{
llinfos << "get_child_status - Child died because of uncaught signal " << process_status << llendl;
LL_INFOS() << "get_child_status - Child died because of uncaught signal " << process_status << LL_ENDL;
#ifdef WCOREDUMP
if (WCOREDUMP(waitpid_status))
{
llinfos << "get_child_status - Child dumped core" << llendl;
LL_INFOS() << "get_child_status - Child dumped core" << LL_ENDL;
}
else
{
llinfos << "get_child_status - Child didn't dump core" << llendl;
LL_INFOS() << "get_child_status - Child didn't dump core" << LL_ENDL;
}
#endif
}
@ -93,7 +93,7 @@ void get_child_status(const int waitpid_status, int &process_status, bool &exite
{
// This is weird. I just dump the waitpid status into the status code,
// not that there's any way of telling what it is...
llinfos << "get_child_status - Got SIGCHILD but child didn't exit" << llendl;
LL_INFOS() << "get_child_status - Got SIGCHILD but child didn't exit" << LL_ENDL;
process_status = waitpid_status;
}
@ -106,7 +106,7 @@ void LLErrorThread::run()
// This thread sits and waits for the sole purpose
// of waiting for the signal/exception handlers to flag the
// application state as APP_STATUS_ERROR.
llinfos << "thread_error - Waiting for an error" << llendl;
LL_INFOS() << "thread_error - Waiting for an error" << LL_ENDL;
S32 counter = 0;
#if !LL_WINDOWS
@ -124,7 +124,7 @@ void LLErrorThread::run()
last_sig_child_count = current_sig_child_count;
if (LLApp::sLogInSignal)
{
llinfos << "thread_error handling SIGCHLD #" << current_sig_child_count << llendl;
LL_INFOS() << "thread_error handling SIGCHLD #" << current_sig_child_count << LL_ENDL;
}
for (LLApp::child_map::iterator iter = LLApp::sChildMap.begin(); iter != LLApp::sChildMap.end();)
{
@ -141,7 +141,7 @@ void LLErrorThread::run()
{
if (LLApp::sLogInSignal)
{
llinfos << "Signal handler - Running child callback" << llendl;
LL_INFOS() << "Signal handler - Running child callback" << LL_ENDL;
}
child_info.mCallback(child_pid, exited, status);
}
@ -172,7 +172,7 @@ void LLErrorThread::run()
{
if (LLApp::sLogInSignal)
{
llinfos << "Signal handler - Running default child callback" << llendl;
LL_INFOS() << "Signal handler - Running default child callback" << LL_ENDL;
}
LLApp::sDefaultChildCallback(child_pid, true, status);
}
@ -188,17 +188,17 @@ void LLErrorThread::run()
if (LLApp::isError())
{
// The app is in an error state, run the application's error handler.
//llinfos << "thread_error - An error has occurred, running error callback!" << llendl;
//LL_INFOS() << "thread_error - An error has occurred, running error callback!" << LL_ENDL;
// Run the error handling callback
LLApp::runErrorHandler();
}
else
{
// Everything is okay, a clean exit.
//llinfos << "thread_error - Application exited cleanly" << llendl;
//LL_INFOS() << "thread_error - Application exited cleanly" << LL_ENDL;
}
//llinfos << "thread_error - Exiting" << llendl;
//LL_INFOS() << "thread_error - Exiting" << LL_ENDL;
LLApp::sErrorThreadRunning = FALSE;
}

View File

@ -400,7 +400,7 @@ void TimeBlock::dumpCurTimes()
<< std::setprecision(3) << total_time.valueInUnits<LLUnits::Milliseconds>() << " ms, "
<< num_calls << " calls";
llinfos << out_str.str() << llendl;
LL_INFOS() << out_str.str() << LL_ENDL;
}
}
@ -431,11 +431,11 @@ TimeBlockAccumulator::TimeBlockAccumulator()
mParent(NULL)
{}
void TimeBlockAccumulator::addSamples( const TimeBlockAccumulator& other, bool append )
void TimeBlockAccumulator::addSamples( const TimeBlockAccumulator& other, EBufferAppendType append_type )
{
// we can't merge two unrelated time block samples, as that will screw with the nested timings
// due to the call hierarchy of each thread
llassert(append);
llassert(append_type == SEQUENTIAL);
mTotalTimeCounter += other.mTotalTimeCounter - other.mStartTotalTimeCounter;
mSelfTimeCounter += other.mSelfTimeCounter;
mCalls += other.mCalls;

View File

@ -29,7 +29,7 @@
#define LL_LLFORMAT_H
// Use as follows:
// llinfos << llformat("Test:%d (%.2f %.2f)", idx, x, y) << llendl;
// LL_INFOS() << llformat("Test:%d (%.2f %.2f)", idx, x, y) << LL_ENDL;
//
// *NOTE: buffer limited to 1024, (but vsnprintf prevents overrun)
// should perhaps be replaced with boost::format.

View File

@ -115,10 +115,10 @@ F64 LLFrameTimer::expiresAt() const
BOOL LLFrameTimer::checkExpirationAndReset(F32 expiration)
{
//llinfos << "LLFrameTimer::checkExpirationAndReset()" << llendl;
//llinfos << " mStartTime:" << mStartTime << llendl;
//llinfos << " sFrameTime:" << sFrameTime << llendl;
//llinfos << " mExpiry: " << mExpiry << llendl;
//LL_INFOS() << "LLFrameTimer::checkExpirationAndReset()" << LL_ENDL;
//LL_INFOS() << " mStartTime:" << mStartTime << LL_ENDL;
//LL_INFOS() << " sFrameTime:" << sFrameTime << LL_ENDL;
//LL_INFOS() << " mExpiry: " << mExpiry << LL_ENDL;
if(hasExpired())
{

View File

@ -98,7 +98,7 @@ LLHeartbeat::rawSendWithTimeout(F32 timeout_sec)
mTimeoutTimer.setTimerExpirySec(timeout_sec);
do {
result = rawSend();
//llinfos << " HEARTSENDc=" << result << llendl;
//LL_INFOS() << " HEARTSENDc=" << result << LL_ENDL;
} while (result==1 && !mTimeoutTimer.hasExpired());
return result;
@ -118,7 +118,7 @@ LLHeartbeat::send(F32 timeout_sec)
// zero-timeout; we don't care too much whether our
// heartbeat was digested.
result = rawSend();
//llinfos << " HEARTSENDb=" << result << llendl;
//LL_INFOS() << " HEARTSENDb=" << result << LL_ENDL;
}
}
@ -146,14 +146,14 @@ LLHeartbeat::send(F32 timeout_sec)
// It's been ages since we successfully had a heartbeat
// digested by the watchdog. Sit here and spin a while
// in the hope that we can force it through.
llwarns << "Unable to deliver heartbeat to launcher for " << mPanicTimer.getElapsedTimeF32() << " seconds. Going to try very hard for up to " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << llendl;
LL_WARNS() << "Unable to deliver heartbeat to launcher for " << mPanicTimer.getElapsedTimeF32() << " seconds. Going to try very hard for up to " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << LL_ENDL;
result = rawSendWithTimeout(mAggressiveHeartbeatMaxBlockingSecs);
if (result == 0) {
total_success = true;
} else {
// we couldn't even force it through. That's bad,
// but we'll try again in a while.
llwarns << "Could not deliver heartbeat to launcher even after trying very hard for " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << llendl;
LL_WARNS() << "Could not deliver heartbeat to launcher even after trying very hard for " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << LL_ENDL;
}
// in any case, reset the panic timer.

View File

@ -47,8 +47,8 @@ LLLiveAppConfig::~LLLiveAppConfig()
// virtual
bool LLLiveAppConfig::loadFile()
{
llinfos << "LLLiveAppConfig::loadFile(): reading from "
<< filename() << llendl;
LL_INFOS() << "LLLiveAppConfig::loadFile(): reading from "
<< filename() << LL_ENDL;
llifstream file(filename());
LLSD config;
if (file.is_open())
@ -56,15 +56,15 @@ bool LLLiveAppConfig::loadFile()
LLSDSerialize::fromXML(config, file);
if(!config.isMap())
{
llwarns << "Live app config not an map in " << filename()
<< " Ignoring the data." << llendl;
LL_WARNS() << "Live app config not an map in " << filename()
<< " Ignoring the data." << LL_ENDL;
return false;
}
file.close();
}
else
{
llinfos << "Live file " << filename() << " does not exit." << llendl;
LL_INFOS() << "Live file " << filename() << " does not exit." << LL_ENDL;
}
// *NOTE: we do not handle the else case here because we would not
// have attempted to load the file unless LLLiveFile had

View File

@ -64,7 +64,7 @@ void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
// Redundant, place to set breakpoints.
if (ptr%alignment!=0)
{
llwarns << "alignment check failed" << llendl;
LL_WARNS() << "alignment check failed" << LL_ENDL;
}
llassert(ptr%alignment==0);
#endif
@ -109,7 +109,7 @@ void LLMemory::updateMemoryInfo()
if (!GetProcessMemoryInfo(self, &counters, sizeof(counters)))
{
llwarns << "GetProcessMemoryInfo failed" << llendl;
LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL;
return ;
}
@ -153,7 +153,7 @@ void* LLMemory::tryToAlloc(void* address, U32 size)
{
if(!VirtualFree(address, 0, MEM_RELEASE))
{
llerrs << "error happens when free some memory reservation." << llendl ;
LL_ERRS() << "error happens when free some memory reservation." << LL_ENDL ;
}
}
return address ;
@ -171,14 +171,14 @@ void LLMemory::logMemoryInfo(BOOL update)
LLPrivateMemoryPoolManager::getInstance()->updateStatistics() ;
}
llinfos << "Current allocated physical memory(KB): " << sAllocatedMemInKB << llendl ;
llinfos << "Current allocated page size (KB): " << sAllocatedPageSizeInKB << llendl ;
llinfos << "Current availabe physical memory(KB): " << sAvailPhysicalMemInKB << llendl ;
llinfos << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << llendl ;
LL_INFOS() << "Current allocated physical memory(KB): " << sAllocatedMemInKB << LL_ENDL ;
LL_INFOS() << "Current allocated page size (KB): " << sAllocatedPageSizeInKB << LL_ENDL ;
LL_INFOS() << "Current availabe physical memory(KB): " << sAvailPhysicalMemInKB << LL_ENDL ;
LL_INFOS() << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << LL_ENDL ;
llinfos << "--- private pool information -- " << llendl ;
llinfos << "Total reserved (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalReservedSize / 1024 << llendl ;
llinfos << "Total allocated (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalAllocatedSize / 1024 << llendl ;
LL_INFOS() << "--- private pool information -- " << LL_ENDL ;
LL_INFOS() << "Total reserved (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalReservedSize / 1024 << LL_ENDL ;
LL_INFOS() << "Total allocated (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalAllocatedSize / 1024 << LL_ENDL ;
}
//return 0: everything is normal;
@ -260,7 +260,7 @@ U64 LLMemory::getCurrentRSS()
if (!GetProcessMemoryInfo(self, &counters, sizeof(counters)))
{
llwarns << "GetProcessMemoryInfo failed" << llendl;
LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL;
return 0;
}
@ -298,7 +298,7 @@ U32 LLMemory::getWorkingSetSize()
// if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1)
// {
// llwarns << "Couldn't get page size" << llendl;
// LL_WARNS() << "Couldn't get page size" << LL_ENDL;
// return 0;
// } else {
// return page_size;
@ -317,11 +317,11 @@ U64 LLMemory::getCurrentRSS()
// If we ever wanted it, the process virtual size is also available as:
// virtualSize = basicInfo.virtual_size;
// llinfos << "resident size is " << residentSize << llendl;
// LL_INFOS() << "resident size is " << residentSize << LL_ENDL;
}
else
{
llwarns << "task_info failed" << llendl;
LL_WARNS() << "task_info failed" << LL_ENDL;
}
return residentSize;
@ -342,7 +342,7 @@ U64 LLMemory::getCurrentRSS()
if (fp == NULL)
{
llwarns << "couldn't open " << statPath << llendl;
LL_WARNS() << "couldn't open " << statPath << LL_ENDL;
goto bail;
}
@ -355,7 +355,7 @@ U64 LLMemory::getCurrentRSS()
&rss);
if (ret != 1)
{
llwarns << "couldn't parse contents of " << statPath << llendl;
LL_WARNS() << "couldn't parse contents of " << statPath << LL_ENDL;
rss = 0;
}
}
@ -385,12 +385,12 @@ U64 LLMemory::getCurrentRSS()
sprintf(path, "/proc/%d/psinfo", (int)getpid());
int proc_fd = -1;
if((proc_fd = open(path, O_RDONLY)) == -1){
llwarns << "LLmemory::getCurrentRSS() unable to open " << path << ". Returning 0 RSS!" << llendl;
LL_WARNS() << "LLmemory::getCurrentRSS() unable to open " << path << ". Returning 0 RSS!" << LL_ENDL;
return 0;
}
psinfo_t proc_psinfo;
if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
llwarns << "LLmemory::getCurrentRSS() Unable to read from " << path << ". Returning 0 RSS!" << llendl;
LL_WARNS() << "LLmemory::getCurrentRSS() Unable to read from " << path << ". Returning 0 RSS!" << LL_ENDL;
close(proc_fd);
return 0;
}
@ -823,7 +823,7 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump()
total_size += blk_list[i]->getBufferSize() ;
if((U32)blk_list[i]->getBuffer() < (U32)blk_list[i-1]->getBuffer() + blk_list[i-1]->getBufferSize())
{
llerrs << "buffer corrupted." << llendl ;
LL_ERRS() << "buffer corrupted." << LL_ENDL ;
}
}
@ -844,32 +844,32 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump()
}
else
{
llerrs << "gap happens" << llendl ;
LL_ERRS() << "gap happens" << LL_ENDL ;
}
}
#endif
#if 0
llinfos << "---------------------------" << llendl ;
llinfos << "Chunk buffer: " << (U32)getBuffer() << " size: " << getBufferSize() << llendl ;
LL_INFOS() << "---------------------------" << LL_ENDL ;
LL_INFOS() << "Chunk buffer: " << (U32)getBuffer() << " size: " << getBufferSize() << LL_ENDL ;
llinfos << "available blocks ... " << llendl ;
LL_INFOS() << "available blocks ... " << LL_ENDL ;
for(S32 i = 0 ; i < mBlockLevels ; i++)
{
LLMemoryBlock* blk = mAvailBlockList[i] ;
while(blk)
{
llinfos << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << llendl ;
LL_INFOS() << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ;
blk = blk->mNext ;
}
}
llinfos << "free blocks ... " << llendl ;
LL_INFOS() << "free blocks ... " << LL_ENDL ;
for(S32 i = 0 ; i < mPartitionLevels ; i++)
{
LLMemoryBlock* blk = mFreeSpaceList[i] ;
while(blk)
{
llinfos << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << llendl ;
LL_INFOS() << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ;
blk = blk->mNext ;
}
}
@ -1265,7 +1265,7 @@ char* LLPrivateMemoryPool::allocate(U32 size)
if(to_log)
{
llwarns << "The memory pool overflows, now using heap directly!" << llendl ;
LL_WARNS() << "The memory pool overflows, now using heap directly!" << LL_ENDL ;
to_log = false ;
}
@ -1358,7 +1358,7 @@ void LLPrivateMemoryPool::destroyPool()
if(mNumOfChunks > 0)
{
llwarns << "There is some memory not freed when destroy the memory pool!" << llendl ;
LL_WARNS() << "There is some memory not freed when destroy the memory pool!" << LL_ENDL ;
}
mNumOfChunks = 0 ;
@ -1376,11 +1376,11 @@ bool LLPrivateMemoryPool::checkSize(U32 asked_size)
{
if(mReservedPoolSize + asked_size > mMaxPoolSize)
{
llinfos << "Max pool size: " << mMaxPoolSize << llendl ;
llinfos << "Total reserved size: " << mReservedPoolSize + asked_size << llendl ;
llinfos << "Total_allocated Size: " << getTotalAllocatedSize() << llendl ;
LL_INFOS() << "Max pool size: " << mMaxPoolSize << LL_ENDL ;
LL_INFOS() << "Total reserved size: " << mReservedPoolSize + asked_size << LL_ENDL ;
LL_INFOS() << "Total_allocated Size: " << getTotalAllocatedSize() << LL_ENDL ;
//llerrs << "The pool is overflowing..." << llendl ;
//LL_ERRS() << "The pool is overflowing..." << LL_ENDL ;
return false ;
}
@ -1593,7 +1593,7 @@ void LLPrivateMemoryPool::removeFromHashTable(LLMemoryChunk* chunk)
void LLPrivateMemoryPool::rehash()
{
llinfos << "new hash factor: " << mHashFactor << llendl ;
LL_INFOS() << "new hash factor: " << mHashFactor << LL_ENDL ;
mChunkHashList.clear() ;
mChunkHashList.resize(mHashFactor) ;
@ -1673,7 +1673,7 @@ void LLPrivateMemoryPool::LLChunkHashElement::remove(LLPrivateMemoryPool::LLMemo
}
else
{
llerrs << "This slot does not contain this chunk!" << llendl ;
LL_ERRS() << "This slot does not contain this chunk!" << LL_ENDL ;
}
}
@ -1705,12 +1705,12 @@ LLPrivateMemoryPoolManager::~LLPrivateMemoryPoolManager()
#if __DEBUG_PRIVATE_MEM__
if(!sMemAllocationTracker.empty())
{
llwarns << "there is potential memory leaking here. The list of not freed memory blocks are from: " <<llendl ;
LL_WARNS() << "there is potential memory leaking here. The list of not freed memory blocks are from: " <<LL_ENDL ;
S32 k = 0 ;
for(mem_allocation_info_t::iterator iter = sMemAllocationTracker.begin() ; iter != sMemAllocationTracker.end() ; ++iter)
{
llinfos << k++ << ", " << (U32)iter->first << " : " << iter->second << llendl ;
LL_INFOS() << k++ << ", " << (U32)iter->first << " : " << iter->second << LL_ENDL ;
}
sMemAllocationTracker.clear() ;
}
@ -1906,7 +1906,7 @@ void LLPrivateMemoryPoolManager::freeMem(LLPrivateMemoryPool* poolp, void* addr
}
else
{
llerrs << "private pool is used before initialized.!" << llendl ;
LL_ERRS() << "private pool is used before initialized.!" << LL_ENDL ;
}
}
}
@ -1980,7 +1980,7 @@ void LLPrivateMemoryPoolTester::test(U32 min_size, U32 max_size, U32 stride, U32
//allocate space for p ;
if(!(p = ::new char**[times]) || !(*p = ::new char*[times * levels]))
{
llerrs << "memory initialization for p failed" << llendl ;
LL_ERRS() << "memory initialization for p failed" << LL_ENDL ;
}
//init
@ -2052,8 +2052,8 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times)
{
LLTimer timer ;
llinfos << " -**********************- " << llendl ;
llinfos << "test size: " << size << " test times: " << times << llendl ;
LL_INFOS() << " -**********************- " << LL_ENDL ;
LL_INFOS() << "test size: " << size << " test times: " << times << LL_ENDL ;
timer.reset() ;
char** p = new char*[times] ;
@ -2065,7 +2065,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times)
p[i] = ALLOCATE_MEM(sPool, size) ;
if(!p[i])
{
llerrs << "allocation failed" << llendl ;
LL_ERRS() << "allocation failed" << LL_ENDL ;
}
}
//de-allocation
@ -2074,7 +2074,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times)
FREE_MEM(sPool, p[i]) ;
p[i] = NULL ;
}
llinfos << "time spent using customized memory pool: " << timer.getElapsedTimeF32() << llendl ;
LL_INFOS() << "time spent using customized memory pool: " << timer.getElapsedTimeF32() << LL_ENDL ;
timer.reset() ;
@ -2085,7 +2085,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times)
p[i] = ::new char[size] ;
if(!p[i])
{
llerrs << "allocation failed" << llendl ;
LL_ERRS() << "allocation failed" << LL_ENDL ;
}
}
//de-allocation
@ -2094,7 +2094,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times)
::delete[] p[i] ;
p[i] = NULL ;
}
llinfos << "time spent using standard allocator/de-allocator: " << timer.getElapsedTimeF32() << llendl ;
LL_INFOS() << "time spent using standard allocator/de-allocator: " << timer.getElapsedTimeF32() << LL_ENDL ;
delete[] p;
}

View File

@ -45,7 +45,7 @@ void LLMemoryStreamBuf::reset(const U8* start, S32 length)
int LLMemoryStreamBuf::underflow()
{
//lldebugs << "LLMemoryStreamBuf::underflow()" << llendl;
//LL_DEBUGS() << "LLMemoryStreamBuf::underflow()" << LL_ENDL;
if(gptr() < egptr())
{
return *gptr();

View File

@ -56,7 +56,7 @@ BOOL LLMetricPerformanceTesterBasic::addTester(LLMetricPerformanceTesterBasic* t
std::string name = tester->getTesterName() ;
if (getTester(name))
{
llerrs << "Tester name is already used by some other tester : " << name << llendl ;
LL_ERRS() << "Tester name is already used by some other tester : " << name << LL_ENDL ;
return FALSE;
}
@ -136,7 +136,7 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std
std::ifstream target_is(target.c_str());
if (!base_is.is_open() || !target_is.is_open())
{
llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl;
LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
base_is.close();
target_is.close();
return;
@ -176,7 +176,7 @@ LLMetricPerformanceTesterBasic::LLMetricPerformanceTesterBasic(std::string name)
{
if (mName == std::string())
{
llerrs << "LLMetricPerformanceTesterBasic construction invalid : Empty name passed to constructor" << llendl ;
LL_ERRS() << "LLMetricPerformanceTesterBasic construction invalid : Empty name passed to constructor" << LL_ENDL ;
}
mValidInstance = LLMetricPerformanceTesterBasic::addTester(this) ;
@ -241,7 +241,7 @@ void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD*
(F32)((*base)[label][ mMetricStrings[index] ].asReal()), (F32)((*current)[label][ mMetricStrings[index] ].asReal())) ;
break;
default:
llerrs << "unsupported metric " << mMetricStrings[index] << " LLSD type: " << (S32)(*current)[label][ mMetricStrings[index] ].type() << llendl ;
LL_ERRS() << "unsupported metric " << mMetricStrings[index] << " LLSD type: " << (S32)(*current)[label][ mMetricStrings[index] ].type() << LL_ENDL ;
}
}
}
@ -305,7 +305,7 @@ void LLMetricPerformanceTesterWithSession::analyzePerformance(std::ofstream* os,
if (!mBaseSessionp || !mCurrentSessionp)
{
llerrs << "Error loading test sessions." << llendl ;
LL_ERRS() << "Error loading test sessions." << LL_ENDL ;
}
// Compare

View File

@ -65,7 +65,7 @@ void LLMetricsImpl::recordEventDetails(const std::string& location,
metrics["location"] = location;
metrics["stats"] = stats;
llinfos << "LLMETRICS: " << (LLSDNotationStreamer(metrics)) << llendl;
LL_INFOS() << "LLMETRICS: " << (LLSDNotationStreamer(metrics)) << LL_ENDL;
}
// Store this:
@ -128,7 +128,7 @@ void LLMetricsImpl::printTotals(LLSD metadata)
out_sd["stats"] = stats;
llinfos << "LLMETRICS: AGGREGATE: " << LLSDOStreamer<LLSDNotationFormatter>(out_sd) << llendl;
LL_INFOS() << "LLMETRICS: AGGREGATE: " << LLSDOStreamer<LLSDNotationFormatter>(out_sd) << LL_ENDL;
}
LLMetrics::LLMetrics()

View File

@ -38,7 +38,7 @@ public:
LLMetrics();
virtual ~LLMetrics();
// Adds this event to aggregate totals and records details to syslog (llinfos)
// Adds this event to aggregate totals and records details to syslog (LL_INFOS())
virtual void recordEventDetails(const std::string& location,
const std::string& mesg,
bool success,

View File

@ -82,7 +82,7 @@ void LLMutex::lock()
// Have to have the lock before we can access the debug info
U32 id = LLThread::currentID();
if (mIsLocked[id] != FALSE)
llerrs << "Already locked in Thread: " << id << llendl;
LL_ERRS() << "Already locked in Thread: " << id << LL_ENDL;
mIsLocked[id] = TRUE;
#endif
@ -101,7 +101,7 @@ void LLMutex::unlock()
// Access the debug info while we have the lock
U32 id = LLThread::currentID();
if (mIsLocked[id] != TRUE)
llerrs << "Not locked in Thread: " << id << llendl;
LL_ERRS() << "Not locked in Thread: " << id << LL_ENDL;
mIsLocked[id] = FALSE;
#endif

View File

@ -156,7 +156,7 @@ protected:
temp->unref();
if (mPointer != NULL)
{
llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl;
LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL;
unref();
}
}

View File

@ -84,7 +84,7 @@ public:
pqm_iter iter = mMap.find(LLPQMKey<DATA_TYPE>(priority, data));
if (iter != mMap.end())
{
llerrs << "Pushing already existing data onto queue!" << llendl;
LL_ERRS() << "Pushing already existing data onto queue!" << LL_ENDL;
}
#endif
mMap.insert(pqm_pair(LLPQMKey<DATA_TYPE>(priority, data), data));
@ -112,14 +112,14 @@ public:
iter = mMap.find(cur_key);
if (iter == mMap.end())
{
llwarns << "Data not on priority queue!" << llendl;
LL_WARNS() << "Data not on priority queue!" << LL_ENDL;
// OK, try iterating through all of the data and seeing if we just screwed up the priority
// somehow.
for (iter = mMap.begin(); iter != mMap.end(); iter++)
{
if ((*(iter)).second == data)
{
llerrs << "Data on priority queue but priority not matched!" << llendl;
LL_ERRS() << "Data on priority queue but priority not matched!" << LL_ENDL;
}
}
return;

View File

@ -700,7 +700,7 @@ private:
__cpuid(0x1, eax, ebx, ecx, edx);
if(feature_infos[0] != (S32)edx)
{
llerrs << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << llendl;
LL_ERRS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL;
}
#endif // LL_RELEASE_FOR_DOWNLOAD

View File

@ -81,7 +81,7 @@ void LLQueuedThread::shutdown()
}
if (timeout == 0)
{
llwarns << "~LLQueuedThread (" << mName << ") timed out!" << llendl;
LL_WARNS() << "~LLQueuedThread (" << mName << ") timed out!" << LL_ENDL;
}
}
else
@ -102,7 +102,7 @@ void LLQueuedThread::shutdown()
}
if (active_count)
{
llwarns << "~LLQueuedThread() called with active requests: " << active_count << llendl;
LL_WARNS() << "~LLQueuedThread() called with active requests: " << active_count << LL_ENDL;
}
}
@ -199,11 +199,11 @@ void LLQueuedThread::printQueueStats()
if (!mRequestQueue.empty())
{
QueuedRequest *req = *mRequestQueue.begin();
llinfos << llformat("Pending Requests:%d Current status:%d", mRequestQueue.size(), req->getStatus()) << llendl;
LL_INFOS() << llformat("Pending Requests:%d Current status:%d", mRequestQueue.size(), req->getStatus()) << LL_ENDL;
}
else
{
llinfos << "Queued Thread Idle" << llendl;
LL_INFOS() << "Queued Thread Idle" << LL_ENDL;
}
unlockData();
}
@ -234,7 +234,7 @@ bool LLQueuedThread::addRequest(QueuedRequest* req)
mRequestQueue.insert(req);
mRequestHash.insert(req);
#if _DEBUG
// llinfos << llformat("LLQueuedThread::Added req [%08d]",handle) << llendl;
// LL_INFOS() << llformat("LLQueuedThread::Added req [%08d]",handle) << LL_ENDL;
#endif
unlockData();
@ -365,7 +365,7 @@ bool LLQueuedThread::completeRequest(handle_t handle)
llassert_always(req->getStatus() != STATUS_QUEUED);
llassert_always(req->getStatus() != STATUS_INPROGRESS);
#if _DEBUG
// llinfos << llformat("LLQueuedThread::Completed req [%08d]",handle) << llendl;
// LL_INFOS() << llformat("LLQueuedThread::Completed req [%08d]",handle) << LL_ENDL;
#endif
mRequestHash.erase(handle);
req->deleteRequest();
@ -386,7 +386,7 @@ bool LLQueuedThread::check()
{
if (entry->getHashKey() > mNextHandle)
{
llerrs << "Hash Error" << llendl;
LL_ERRS() << "Hash Error" << LL_ENDL;
return false;
}
entry = entry->getNextEntry();
@ -520,7 +520,7 @@ void LLQueuedThread::run()
}
//LLThread::yield(); // thread should yield after each request
}
llinfos << "LLQueuedThread " << mName << " EXITING." << llendl;
LL_INFOS() << "LLQueuedThread " << mName << " EXITING." << LL_ENDL;
}
// virtual

View File

@ -76,7 +76,7 @@ LLRefCount::~LLRefCount()
{
if (mRef != 0)
{
llerrs << "deleting non-zero reference" << llendl;
LL_ERRS() << "deleting non-zero reference" << LL_ENDL;
}
#if LL_REF_COUNT_DEBUG
@ -95,8 +95,8 @@ void LLRefCount::ref() const
if(mMutexp->isLocked())
{
mCrashAtUnlock = TRUE ;
llerrs << "the mutex is locked by the thread: " << mLockedThreadID
<< " Current thread: " << LLThread::currentID() << llendl ;
LL_ERRS() << "the mutex is locked by the thread: " << mLockedThreadID
<< " Current thread: " << LLThread::currentID() << LL_ENDL ;
}
mMutexp->lock() ;
@ -123,8 +123,8 @@ S32 LLRefCount::unref() const
if(mMutexp->isLocked())
{
mCrashAtUnlock = TRUE ;
llerrs << "the mutex is locked by the thread: " << mLockedThreadID
<< " Current thread: " << LLThread::currentID() << llendl ;
LL_ERRS() << "the mutex is locked by the thread: " << mLockedThreadID
<< " Current thread: " << LLThread::currentID() << LL_ENDL ;
}
mMutexp->lock() ;

View File

@ -62,7 +62,7 @@ public:
{
if (mMap.insert(std::make_pair(key, value)).second == false)
{
llwarns << "Tried to register " << key << " but it was already registered!" << llendl;
LL_WARNS() << "Tried to register " << key << " but it was already registered!" << LL_ENDL;
return false;
}
return true;
@ -307,7 +307,7 @@ public:
{
if (singleton_t::instance().exists(key))
{
llerrs << "Duplicate registry entry under key \"" << key << "\"" << llendl;
LL_ERRS() << "Duplicate registry entry under key \"" << key << "\"" << LL_ENDL;
}
singleton_t::instance().mStaticScope->add(key, value);
}

View File

@ -134,7 +134,7 @@ protected:
tempp->unref();
if (mPointer != NULL)
{
llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl;
LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL;
unref();
}
}

View File

@ -81,7 +81,7 @@ void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize
break;
default:
llwarns << "serialize request for unknown ELLSD_Serialize" << llendl;
LL_WARNS() << "serialize request for unknown ELLSD_Serialize" << LL_ENDL;
}
if (f.notNull())
@ -169,7 +169,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
}
else
{
llwarns << "deserialize request for unknown ELLSD_Serialize" << llendl;
LL_WARNS() << "deserialize request for unknown ELLSD_Serialize" << LL_ENDL;
}
if (p.notNull())
@ -179,7 +179,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
}
fail:
llwarns << "deserialize LLSD parse failure" << llendl;
LL_WARNS() << "deserialize LLSD parse failure" << LL_ENDL;
return false;
}
@ -445,7 +445,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading map." << llendl;
LL_INFOS() << "STREAM FAILURE reading map." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -464,7 +464,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading array." << llendl;
LL_INFOS() << "STREAM FAILURE reading array." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -500,7 +500,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading boolean." << llendl;
LL_INFOS() << "STREAM FAILURE reading boolean." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -526,7 +526,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading boolean." << llendl;
LL_INFOS() << "STREAM FAILURE reading boolean." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -539,7 +539,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
data = integer;
if(istr.fail())
{
llinfos << "STREAM FAILURE reading integer." << llendl;
LL_INFOS() << "STREAM FAILURE reading integer." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -553,7 +553,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
data = real;
if(istr.fail())
{
llinfos << "STREAM FAILURE reading real." << llendl;
LL_INFOS() << "STREAM FAILURE reading real." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -567,7 +567,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
data = id;
if(istr.fail())
{
llinfos << "STREAM FAILURE reading uuid." << llendl;
LL_INFOS() << "STREAM FAILURE reading uuid." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -582,7 +582,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading string." << llendl;
LL_INFOS() << "STREAM FAILURE reading string." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -604,7 +604,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading link." << llendl;
LL_INFOS() << "STREAM FAILURE reading link." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -627,7 +627,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading date." << llendl;
LL_INFOS() << "STREAM FAILURE reading date." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -640,15 +640,15 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading data." << llendl;
LL_INFOS() << "STREAM FAILURE reading data." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
default:
parse_count = PARSE_FAILURE;
llinfos << "Unrecognized character while parsing: int(" << (int)c
<< ")" << llendl;
LL_INFOS() << "Unrecognized character while parsing: int(" << (int)c
<< ")" << LL_ENDL;
break;
}
if(PARSE_FAILURE == parse_count)
@ -909,7 +909,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary map." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary map." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -928,7 +928,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary array." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary array." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -953,7 +953,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
data = (S32)ntohl(value_nbo);
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary integer." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary integer." << LL_ENDL;
}
break;
}
@ -965,7 +965,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
data = ll_ntohd(real_nbo);
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary real." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary real." << LL_ENDL;
}
break;
}
@ -977,7 +977,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
data = id;
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary uuid." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary uuid." << LL_ENDL;
}
break;
}
@ -998,8 +998,8 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary (notation-style) string."
<< llendl;
LL_INFOS() << "STREAM FAILURE reading binary (notation-style) string."
<< LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -1018,7 +1018,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary string." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary string." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -1037,7 +1037,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary link." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary link." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -1050,7 +1050,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
data = LLDate(real);
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary date." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary date." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -1079,7 +1079,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
}
if(istr.fail())
{
llinfos << "STREAM FAILURE reading binary." << llendl;
LL_INFOS() << "STREAM FAILURE reading binary." << LL_ENDL;
parse_count = PARSE_FAILURE;
}
break;
@ -1087,8 +1087,8 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
default:
parse_count = PARSE_FAILURE;
llinfos << "Unrecognized character while parsing: int(" << (int)c
<< ")" << llendl;
LL_INFOS() << "Unrecognized character while parsing: int(" << (int)c
<< ")" << LL_ENDL;
break;
}
if(PARSE_FAILURE == parse_count)
@ -2017,7 +2017,7 @@ std::string zip_llsd(LLSD& data)
S32 ret = deflateInit(&strm, Z_BEST_COMPRESSION);
if (ret != Z_OK)
{
llwarns << "Failed to compress LLSD block." << llendl;
LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL;
return std::string();
}
@ -2044,7 +2044,7 @@ std::string zip_llsd(LLSD& data)
if (strm.avail_out >= CHUNK)
{
free(output);
llwarns << "Failed to compress LLSD block." << llendl;
LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL;
return std::string();
}
@ -2056,7 +2056,7 @@ std::string zip_llsd(LLSD& data)
else
{
free(output);
llwarns << "Failed to compress LLSD block." << llendl;
LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL;
return std::string();
}
}
@ -2073,7 +2073,7 @@ std::string zip_llsd(LLSD& data)
LLSD test_sd;
if (!unzip_llsd(test_sd, test, result.size()))
{
llerrs << "Invalid compression result!" << llendl;
LL_ERRS() << "Invalid compression result!" << LL_ENDL;
}
#endif
@ -2163,7 +2163,7 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
if (!LLSDSerialize::fromBinary(data, istr, cur_size))
{
llwarns << "Failed to unzip LLSD block" << llendl;
LL_WARNS() << "Failed to unzip LLSD block" << LL_ENDL;
free(result);
return false;
}

View File

@ -406,7 +406,7 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
}
if (mEmitErrors)
{
llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl;
LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << LL_ENDL;
}
data = LLSD();
return LLSDParser::PARSE_FAILURE;
@ -487,7 +487,7 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data)
{
if (mEmitErrors)
{
llinfos << "LLSDXMLParser::Impl::parseLines: XML_STATUS_ERROR" << llendl;
LL_INFOS() << "LLSDXMLParser::Impl::parseLines: XML_STATUS_ERROR" << LL_ENDL;
}
return LLSDParser::PARSE_FAILURE;
}
@ -549,7 +549,7 @@ void LLSDXMLParser::Impl::parsePart(const char* buf, int len)
XML_Status status = XML_Parse(mParser, buf, len, false);
if (status == XML_STATUS_ERROR)
{
llinfos << "Unexpected XML parsing error at start" << llendl;
LL_INFOS() << "Unexpected XML parsing error at start" << LL_ENDL;
}
}
}

View File

@ -143,7 +143,7 @@ public:
llassert(false);
return NULL;
case CONSTRUCTING:
llerrs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from singleton constructor!" << llendl;
LL_ERRS() << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from singleton constructor!" << LL_ENDL;
return NULL;
case INITIALIZING:
// go ahead and flag ourselves as initialized so we can be reentrant during initialization
@ -155,7 +155,7 @@ public:
case INITIALIZED:
return sData.mInstance;
case DELETED:
llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl;
LL_WARNS() << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << LL_ENDL;
SingletonLifetimeManager::construct();
// same as first time construction
sData.mInitState = INITIALIZED;

View File

@ -110,7 +110,7 @@ bool _read_file_into_string(std::string& str, const std::string& filename)
llifstream ifs(filename, llifstream::binary);
if (!ifs.is_open())
{
llinfos << "Unable to open file " << filename << llendl;
LL_INFOS() << "Unable to open file " << filename << LL_ENDL;
return false;
}
@ -188,7 +188,7 @@ S32 wchar_to_utf8chars(llwchar in_char, char* outchars)
}
else
{
llwarns << "Invalid Unicode character " << cur_char << "!" << llendl;
LL_WARNS() << "Invalid Unicode character " << cur_char << "!" << LL_ENDL;
*outchars++ = LL_UNKNOWN_CHAR;
}
return outchars - base;

View File

@ -607,7 +607,7 @@ S32 LLOSInfo::getMaxOpenFiles()
}
else
{
llerrs << "LLOSInfo::getMaxOpenFiles: sysconf error for _SC_OPEN_MAX" << llendl;
LL_ERRS() << "LLOSInfo::getMaxOpenFiles: sysconf error for _SC_OPEN_MAX" << LL_ENDL;
}
}
}
@ -666,12 +666,12 @@ U32 LLOSInfo::getProcessVirtualSizeKB()
sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid());
int proc_fd = -1;
if((proc_fd = open(proc_ps, O_RDONLY)) == -1){
llwarns << "unable to open " << proc_ps << llendl;
LL_WARNS() << "unable to open " << proc_ps << LL_ENDL;
return 0;
}
psinfo_t proc_psinfo;
if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
llwarns << "Unable to read " << proc_ps << llendl;
LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL;
close(proc_fd);
return 0;
}
@ -712,12 +712,12 @@ U32 LLOSInfo::getProcessResidentSizeKB()
sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid());
int proc_fd = -1;
if((proc_fd = open(proc_ps, O_RDONLY)) == -1){
llwarns << "unable to open " << proc_ps << llendl;
LL_WARNS() << "unable to open " << proc_ps << LL_ENDL;
return 0;
}
psinfo_t proc_psinfo;
if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
llwarns << "Unable to read " << proc_ps << llendl;
LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL;
close(proc_fd);
return 0;
}
@ -1449,7 +1449,7 @@ BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile)
size_t nwrit = fwrite(buffer, sizeof(U8), bytes, dst);
if (nwrit < (size_t) bytes)
{
llwarns << "Short write on " << tmpfile << ": Wrote " << nwrit << " of " << bytes << " bytes." << llendl;
LL_WARNS() << "Short write on " << tmpfile << ": Wrote " << nwrit << " of " << bytes << " bytes." << LL_ENDL;
goto err;
}
} while(gzeof(src) == 0);
@ -1482,14 +1482,14 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
{
if (gzwrite(dst, buffer, bytes) <= 0)
{
llwarns << "gzwrite failed: " << gzerror(dst, NULL) << llendl;
LL_WARNS() << "gzwrite failed: " << gzerror(dst, NULL) << LL_ENDL;
goto err;
}
}
if (ferror(src))
{
llwarns << "Error reading " << srcfile << llendl;
LL_WARNS() << "Error reading " << srcfile << LL_ENDL;
goto err;
}

View File

@ -33,7 +33,7 @@
// use an LLCPUInfo object:
//
// LLCPUInfo info;
// llinfos << info << llendl;
// LL_INFOS() << info << LL_ENDL;
//
#include "llsd.h"
@ -105,7 +105,7 @@ class LL_COMMON_API LLMemoryInfo
Here's how you use an LLMemoryInfo:
LLMemoryInfo info;
<br> llinfos << info << llendl;
<br> LL_INFOS() << info << LL_ENDL;
*/
{
public:

View File

@ -108,7 +108,7 @@ LL_COMMON_API void assert_main_thread()
static U32 s_thread_id = LLThread::currentID();
if (LLThread::currentID() != s_thread_id)
{
llerrs << "Illegal execution outside main thread." << llendl;
LL_ERRS() << "Illegal execution outside main thread." << LL_ENDL;
}
}
@ -140,7 +140,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
// Run the user supplied function
threadp->run();
//llinfos << "LLThread::staticRun() Exiting: " << threadp->mName << llendl;
//LL_INFOS() << "LLThread::staticRun() Exiting: " << threadp->mName << LL_ENDL;
// We're done with the run function, this thread is done executing now.
threadp->mStatus = STOPPED;
@ -197,7 +197,7 @@ void LLThread::shutdown()
// First, set the flag that indicates that we're ready to die
setQuitting();
//llinfos << "LLThread::~LLThread() Killing thread " << mName << " Status: " << mStatus << llendl;
//LL_INFOS() << "LLThread::~LLThread() Killing thread " << mName << " Status: " << mStatus << LL_ENDL;
// Now wait a bit for the thread to exit
// It's unclear whether I should even bother doing this - this destructor
// should never get called unless we're already stopped, really...
@ -219,7 +219,7 @@ void LLThread::shutdown()
if (!isStopped())
{
// This thread just wouldn't stop, even though we gave it time
//llwarns << "LLThread::~LLThread() exiting thread before clean exit!" << llendl;
//LL_WARNS() << "LLThread::~LLThread() exiting thread before clean exit!" << LL_ENDL;
// Put a stake in its heart.
apr_thread_exit(mAPRThreadp, -1);
return;
@ -259,7 +259,7 @@ void LLThread::start()
else
{
mStatus = STOPPED;
llwarns << "failed to start thread " << mName << llendl;
LL_WARNS() << "failed to start thread " << mName << LL_ENDL;
ll_apr_warn_status(status);
}
@ -416,7 +416,7 @@ LLThreadSafeRefCount::~LLThreadSafeRefCount()
{
if (mRef != 0)
{
llerrs << "deleting non-zero reference" << llendl;
LL_ERRS() << "deleting non-zero reference" << LL_ENDL;
}
}

View File

@ -43,7 +43,7 @@ void LLThreadLocalPointerBase::set( void* value )
if (result != APR_SUCCESS)
{
ll_apr_warn_status(result);
llerrs << "Failed to set thread local data" << llendl;
LL_ERRS() << "Failed to set thread local data" << LL_ENDL;
}
}
@ -56,7 +56,7 @@ void* LLThreadLocalPointerBase::get() const
if (result != APR_SUCCESS)
{
ll_apr_warn_status(result);
llerrs << "Failed to get thread local data" << llendl;
LL_ERRS() << "Failed to get thread local data" << LL_ENDL;
}
return ptr;
}
@ -68,7 +68,7 @@ void LLThreadLocalPointerBase::initStorage( )
if (result != APR_SUCCESS)
{
ll_apr_warn_status(result);
llerrs << "Failed to allocate thread local data" << llendl;
LL_ERRS() << "Failed to allocate thread local data" << LL_ENDL;
}
}
@ -82,7 +82,7 @@ void LLThreadLocalPointerBase::destroyStorage()
if (result != APR_SUCCESS)
{
ll_apr_warn_status(result);
llerrs << "Failed to delete thread local data" << llendl;
LL_ERRS() << "Failed to delete thread local data" << LL_ENDL;
}
}
}

View File

@ -157,14 +157,14 @@ private:
#elif LL_DARWIN
static void TLSError()
{
llerrs << "Could not create thread local storage" << llendl;
LL_ERRS() << "Could not create thread local storage" << LL_ENDL;
}
static void createTLSKey()
{
static S32 key_created = pthread_key_create(&sInstanceKey, NULL);
if (key_created != 0)
{
llerrs << "Could not create thread local storage" << llendl;
LL_ERRS() << "Could not create thread local storage" << LL_ENDL;
}
}
static pthread_key_t sInstanceKey;

View File

@ -54,7 +54,7 @@ LLThreadSafeQueueImplementation::LLThreadSafeQueueImplementation(apr_pool_t * po
LLThreadSafeQueueImplementation::~LLThreadSafeQueueImplementation()
{
if(mQueue != 0) {
if(apr_queue_size(mQueue) != 0) llwarns <<
if(apr_queue_size(mQueue) != 0) LL_WARNS() <<
"terminating queue which still contains " << apr_queue_size(mQueue) <<
" elements;" << "memory will be leaked" << LL_ENDL;
apr_queue_term(mQueue);

View File

@ -456,7 +456,7 @@ BOOL LLTimer::knownBadTimer()
{
if (!wcscmp(pci_id, bad_pci_list[check]))
{
// llwarns << "unreliable PCI chipset found!! " << pci_id << endl;
// LL_WARNS() << "unreliable PCI chipset found!! " << pci_id << endl;
failed = TRUE;
break;
}

View File

@ -40,12 +40,12 @@ TraceBase::TraceBase( const char* name, const char* description )
#ifndef LL_RELEASE_FOR_DOWNLOAD
if (LLTrace::get_master_thread_recorder() != NULL)
{
llerrs << "Attempting to declare trace object after program initialization. Trace objects should be statically initialized." << llendl;
LL_ERRS() << "Attempting to declare trace object after program initialization. Trace objects should be statically initialized." << LL_ENDL;
}
#endif
}
const char* TraceBase::getUnitLabel()
const char* TraceBase::getUnitLabel() const
{
return "";
}

View File

@ -58,7 +58,7 @@ class TraceBase
public:
TraceBase(const char* name, const char* description);
virtual ~TraceBase() {};
virtual const char* getUnitLabel();
virtual const char* getUnitLabel() const;
const std::string& getName() const { return mName; }
const std::string& getDescription() const { return mDescription; }
@ -129,7 +129,7 @@ public:
: trace_t(name, description)
{}
/*virtual*/ const char* getUnitLabel() { return LLGetUnitLabel<T>::getUnitLabel(); }
/*virtual*/ const char* getUnitLabel() const { return LLGetUnitLabel<T>::getUnitLabel(); }
};
@ -153,7 +153,7 @@ public:
: trace_t(name, description)
{}
/*virtual*/ const char* getUnitLabel() { return LLGetUnitLabel<T>::getUnitLabel(); }
/*virtual*/ const char* getUnitLabel() const { return LLGetUnitLabel<T>::getUnitLabel(); }
};
template<typename T, typename VALUE_T>
@ -176,7 +176,7 @@ public:
: trace_t(name, description)
{}
/*virtual*/ const char* getUnitLabel() { return LLGetUnitLabel<T>::getUnitLabel(); }
/*virtual*/ const char* getUnitLabel() const { return LLGetUnitLabel<T>::getUnitLabel(); }
};
template<typename T, typename VALUE_T>
@ -227,7 +227,7 @@ public:
: trace_t(name)
{}
/*virtual*/ const char* getUnitLabel() { return "B"; }
/*virtual*/ const char* getUnitLabel() const { return "B"; }
TraceType<MemStatAccumulator::AllocationCountFacet>& allocationCount()
{

View File

@ -86,21 +86,21 @@ bool AccumulatorBufferGroup::isPrimary() const
void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
{
mCounts.addSamples(other.mCounts);
mSamples.addSamples(other.mSamples);
mEvents.addSamples(other.mEvents);
mMemStats.addSamples(other.mMemStats);
mStackTimers.addSamples(other.mStackTimers);
mCounts.addSamples(other.mCounts, SEQUENTIAL);
mSamples.addSamples(other.mSamples, SEQUENTIAL);
mEvents.addSamples(other.mEvents, SEQUENTIAL);
mMemStats.addSamples(other.mMemStats, SEQUENTIAL);
mStackTimers.addSamples(other.mStackTimers, SEQUENTIAL);
}
void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
{
mCounts.addSamples(other.mCounts, false);
mSamples.addSamples(other.mSamples, false);
mEvents.addSamples(other.mEvents, false);
mMemStats.addSamples(other.mMemStats, false);
mCounts.addSamples(other.mCounts, NON_SEQUENTIAL);
mSamples.addSamples(other.mSamples, NON_SEQUENTIAL);
mEvents.addSamples(other.mEvents, NON_SEQUENTIAL);
mMemStats.addSamples(other.mMemStats, NON_SEQUENTIAL);
// for now, hold out timers from merge, need to be displayed per thread
//mStackTimers.addSamples(other.mStackTimers, false);
//mStackTimers.addSamples(other.mStackTimers, NON_SEQUENTIAL);
}
void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other)
@ -120,4 +120,130 @@ void AccumulatorBufferGroup::sync()
mMemStats.sync(time_stamp);
}
void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppendType append_type )
{
if (!mHasValue)
{
*this = other;
if (append_type == NON_SEQUENTIAL)
{
// restore own last value state
mLastValue = NaN;
mHasValue = false;
}
}
else if (other.mHasValue)
{
mSum += other.mSum;
if (other.mMin < mMin) { mMin = other.mMin; }
if (other.mMax > mMax) { mMax = other.mMax; }
F64 epsilon = 0.0000001;
if (other.mTotalSamplingTime > epsilon)
{
// combine variance (and hence standard deviation) of 2 different sized sample groups using
// the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm
F64 n_1 = mTotalSamplingTime,
n_2 = other.mTotalSamplingTime;
F64 m_1 = mMean,
m_2 = other.mMean;
F64 v_1 = mSumOfSquares / mTotalSamplingTime,
v_2 = other.mSumOfSquares / other.mTotalSamplingTime;
if (n_1 < epsilon)
{
mSumOfSquares = other.mSumOfSquares;
}
else
{
mSumOfSquares = mTotalSamplingTime
* ((((n_1 - epsilon) * v_1)
+ ((n_2 - epsilon) * v_2)
+ (((n_1 * n_2) / (n_1 + n_2))
* ((m_1 * m_1) + (m_2 * m_2) - (2.f * m_1 * m_2))))
/ (n_1 + n_2 - epsilon));
}
llassert(other.mTotalSamplingTime > 0);
F64 weight = mTotalSamplingTime / (mTotalSamplingTime + other.mTotalSamplingTime);
mNumSamples += other.mNumSamples;
mTotalSamplingTime += other.mTotalSamplingTime;
mMean = (mMean * weight) + (other.mMean * (1.0 - weight));
}
if (append_type == SEQUENTIAL)
{
mLastValue = other.mLastValue;
mLastSampleTimeStamp = other.mLastSampleTimeStamp;
mHasValue = true;
}
}
}
void SampleAccumulator::reset( const SampleAccumulator* other )
{
mLastValue = other ? other->mLastValue : NaN;
mHasValue = other ? other->mHasValue : false;
mNumSamples = 0;
mSum = 0;
mMin = mLastValue;
mMax = mLastValue;
mMean = mLastValue;
mSumOfSquares = 0;
mLastSampleTimeStamp = LLTimer::getTotalSeconds();
mTotalSamplingTime = 0;
}
void EventAccumulator::addSamples( const EventAccumulator& other, EBufferAppendType append_type )
{
if (other.mNumSamples)
{
if (!mNumSamples)
{
*this = other;
}
else
{
mSum += other.mSum;
// NOTE: both conditions will hold first time through
if (other.mMin < mMin) { mMin = other.mMin; }
if (other.mMax > mMax) { mMax = other.mMax; }
// combine variance (and hence standard deviation) of 2 different sized sample groups using
// the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm
F64 n_1 = (F64)mNumSamples,
n_2 = (F64)other.mNumSamples;
F64 m_1 = mMean,
m_2 = other.mMean;
F64 v_1 = mSumOfSquares / mNumSamples,
v_2 = other.mSumOfSquares / other.mNumSamples;
mSumOfSquares = (F64)mNumSamples
* ((((n_1 - 1.f) * v_1)
+ ((n_2 - 1.f) * v_2)
+ (((n_1 * n_2) / (n_1 + n_2))
* ((m_1 * m_1) + (m_2 * m_2) - (2.f * m_1 * m_2))))
/ (n_1 + n_2 - 1.f));
F64 weight = (F64)mNumSamples / (F64)(mNumSamples + other.mNumSamples);
mNumSamples += other.mNumSamples;
mMean = mMean * weight + other.mMean * (1.f - weight);
if (append_type == SEQUENTIAL) mLastValue = other.mLastValue;
}
}
}
void EventAccumulator::reset( const EventAccumulator* other )
{
mNumSamples = 0;
mSum = NaN;
mMin = NaN;
mMax = NaN;
mMean = NaN;
mSumOfSquares = 0;
mLastValue = other ? other->mLastValue : NaN;
}
}

View File

@ -38,6 +38,14 @@
namespace LLTrace
{
const F64 NaN = std::numeric_limits<double>::quiet_NaN();
enum EBufferAppendType
{
SEQUENTIAL,
NON_SEQUENTIAL
};
template<typename ACCUMULATOR>
class AccumulatorBuffer : public LLRefCount
{
@ -83,12 +91,12 @@ namespace LLTrace
return mStorage[index];
}
void addSamples(const AccumulatorBuffer<ACCUMULATOR>& other, bool append = true)
void addSamples(const AccumulatorBuffer<ACCUMULATOR>& other, EBufferAppendType append_type)
{
llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize > sNextStorageSlot);
for (size_t i = 0; i < sNextStorageSlot; i++)
{
mStorage[i].addSamples(other.mStorage[i], append);
mStorage[i].addSamples(other.mStorage[i], append_type);
}
}
@ -211,106 +219,58 @@ namespace LLTrace
template<typename ACCUMULATOR> size_t AccumulatorBuffer<ACCUMULATOR>::sNextStorageSlot = 0;
template<typename ACCUMULATOR> AccumulatorBuffer<ACCUMULATOR>* AccumulatorBuffer<ACCUMULATOR>::sDefaultBuffer = NULL;
class EventAccumulator
{
public:
typedef F64 value_t;
typedef F64 mean_t;
EventAccumulator()
: mSum(0),
mMin((std::numeric_limits<F64>::max)()),
mMax((std::numeric_limits<F64>::min)()),
mMean(0),
: mSum(NaN),
mMin(NaN),
mMax(NaN),
mMean(NaN),
mSumOfSquares(0),
mNumSamples(0),
mLastValue(0)
mLastValue(NaN)
{}
void record(F64 value)
{
mNumSamples++;
mSum += value;
// NOTE: both conditions will hold on first pass through
if (value < mMin)
if (mNumSamples == 0)
{
mSum = value;
mMean = value;
mMin = value;
}
if (value > mMax)
{
mMax = value;
}
F64 old_mean = mMean;
mMean += (value - old_mean) / (F64)mNumSamples;
mSumOfSquares += (value - old_mean) * (value - mMean);
else
{
mSum += value;
F64 old_mean = mMean;
mMean += (value - old_mean) / (F64)mNumSamples;
mSumOfSquares += (value - old_mean) * (value - mMean);
if (value < mMin) { mMin = value; }
else if (value > mMax) { mMax = value; }
}
mNumSamples++;
mLastValue = value;
}
void addSamples(const EventAccumulator& other, bool append)
{
if (other.mNumSamples)
{
mSum += other.mSum;
// NOTE: both conditions will hold first time through
if (other.mMin < mMin) { mMin = other.mMin; }
if (other.mMax > mMax) { mMax = other.mMax; }
// combine variance (and hence standard deviation) of 2 different sized sample groups using
// the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm
F64 n_1 = (F64)mNumSamples,
n_2 = (F64)other.mNumSamples;
F64 m_1 = mMean,
m_2 = other.mMean;
F64 v_1 = mSumOfSquares / mNumSamples,
v_2 = other.mSumOfSquares / other.mNumSamples;
if (n_1 == 0)
{
mSumOfSquares = other.mSumOfSquares;
}
else if (n_2 == 0)
{
// don't touch variance
// mSumOfSquares = mSumOfSquares;
}
else
{
mSumOfSquares = (F64)mNumSamples
* ((((n_1 - 1.f) * v_1)
+ ((n_2 - 1.f) * v_2)
+ (((n_1 * n_2) / (n_1 + n_2))
* ((m_1 * m_1) + (m_2 * m_2) - (2.f * m_1 * m_2))))
/ (n_1 + n_2 - 1.f));
}
F64 weight = (F64)mNumSamples / (F64)(mNumSamples + other.mNumSamples);
mNumSamples += other.mNumSamples;
mMean = mMean * weight + other.mMean * (1.f - weight);
if (append) mLastValue = other.mLastValue;
}
}
void reset(const EventAccumulator* other)
{
mNumSamples = 0;
mSum = 0;
mMin = std::numeric_limits<F64>::max();
mMax = std::numeric_limits<F64>::min();
mMean = 0;
mSumOfSquares = 0;
mLastValue = other ? other->mLastValue : 0;
}
void addSamples(const EventAccumulator& other, EBufferAppendType append_type);
void reset(const EventAccumulator* other);
void sync(LLUnitImplicit<F64, LLUnits::Seconds>) {}
F64 getSum() const { return mSum; }
F64 getMin() const { return mMin; }
F64 getMax() const { return mMax; }
F64 getLastValue() const { return mLastValue; }
F64 getMean() const { return mMean; }
F64 getSum() const { return mSum; }
F64 getMin() const { return mMin; }
F64 getMax() const { return mMax; }
F64 getLastValue() const { return mLastValue; }
F64 getMean() const { return mMean; }
F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mNumSamples); }
U32 getSampleCount() const { return mNumSamples; }
F64 getSumOfSquares() const { return mSumOfSquares; }
U32 getSampleCount() const { return mNumSamples; }
bool hasValue() const { return mNumSamples > 0; }
private:
F64 mSum,
@ -329,154 +289,96 @@ namespace LLTrace
{
public:
typedef F64 value_t;
typedef F64 mean_t;
SampleAccumulator()
: mSum(0),
mMin((std::numeric_limits<F64>::max)()),
mMax((std::numeric_limits<F64>::min)()),
mMean(0),
mMin(NaN),
mMax(NaN),
mMean(NaN),
mSumOfSquares(0),
mLastSampleTimeStamp(LLTimer::getTotalSeconds()),
mLastSampleTimeStamp(0),
mTotalSamplingTime(0),
mNumSamples(0),
mLastValue(0),
mLastValue(NaN),
mHasValue(false)
{}
void sample(F64 value)
{
LLUnitImplicit<F64, LLUnits::Seconds> time_stamp = LLTimer::getTotalSeconds();
LLUnitImplicit<F64, LLUnits::Seconds> delta_time = time_stamp - mLastSampleTimeStamp;
mLastSampleTimeStamp = time_stamp;
if (mHasValue)
// store effect of last value
sync(time_stamp);
if (!mHasValue)
{
mTotalSamplingTime += delta_time;
mSum += mLastValue * delta_time;
mHasValue = true;
// NOTE: both conditions will hold first time through
mMin = value;
mMax = value;
mMean = value;
mLastSampleTimeStamp = time_stamp;
}
else
{
if (value < mMin) { mMin = value; }
if (value > mMax) { mMax = value; }
F64 old_mean = mMean;
mMean += (delta_time / mTotalSamplingTime) * (mLastValue - old_mean);
mSumOfSquares += delta_time * (mLastValue - old_mean) * (mLastValue - mMean);
else if (value > mMax) { mMax = value; }
}
mLastValue = value;
mNumSamples++;
mHasValue = true;
}
void addSamples(const SampleAccumulator& other, bool append)
{
if (other.mTotalSamplingTime)
{
mSum += other.mSum;
// NOTE: both conditions will hold first time through
if (other.mMin < mMin) { mMin = other.mMin; }
if (other.mMax > mMax) { mMax = other.mMax; }
// combine variance (and hence standard deviation) of 2 different sized sample groups using
// the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm
F64 n_1 = mTotalSamplingTime,
n_2 = other.mTotalSamplingTime;
F64 m_1 = mMean,
m_2 = other.mMean;
F64 v_1 = mSumOfSquares / mTotalSamplingTime,
v_2 = other.mSumOfSquares / other.mTotalSamplingTime;
if (n_1 == 0)
{
mSumOfSquares = other.mSumOfSquares;
}
else if (n_2 == 0)
{
// variance is unchanged
// mSumOfSquares = mSumOfSquares;
}
else
{
mSumOfSquares = mTotalSamplingTime
* ((((n_1 - 1.f) * v_1)
+ ((n_2 - 1.f) * v_2)
+ (((n_1 * n_2) / (n_1 + n_2))
* ((m_1 * m_1) + (m_2 * m_2) - (2.f * m_1 * m_2))))
/ (n_1 + n_2 - 1.f));
}
llassert(other.mTotalSamplingTime > 0);
F64 weight = mTotalSamplingTime / (mTotalSamplingTime + other.mTotalSamplingTime);
mNumSamples += other.mNumSamples;
mTotalSamplingTime += other.mTotalSamplingTime;
mMean = (mMean * weight) + (other.mMean * (1.0 - weight));
if (append)
{
mLastValue = other.mLastValue;
mLastSampleTimeStamp = other.mLastSampleTimeStamp;
mHasValue |= other.mHasValue;
}
}
}
void reset(const SampleAccumulator* other)
{
mNumSamples = 0;
mSum = 0;
mMin = std::numeric_limits<F64>::max();
mMax = std::numeric_limits<F64>::min();
mMean = other ? other->mLastValue : 0;
mSumOfSquares = 0;
mLastSampleTimeStamp = LLTimer::getTotalSeconds();
mTotalSamplingTime = 0;
mLastValue = other ? other->mLastValue : 0;
mHasValue = other ? other->mHasValue : false;
}
void addSamples(const SampleAccumulator& other, EBufferAppendType append_type);
void reset(const SampleAccumulator* other);
void sync(LLUnitImplicit<F64, LLUnits::Seconds> time_stamp)
{
LLUnitImplicit<F64, LLUnits::Seconds> delta_time = time_stamp - mLastSampleTimeStamp;
if (mHasValue)
{
LLUnitImplicit<F64, LLUnits::Seconds> delta_time = time_stamp - mLastSampleTimeStamp;
mSum += mLastValue * delta_time;
mTotalSamplingTime += delta_time;
F64 old_mean = mMean;
mMean += (delta_time / mTotalSamplingTime) * (mLastValue - old_mean);
mSumOfSquares += delta_time * (mLastValue - old_mean) * (mLastValue - mMean);
}
mLastSampleTimeStamp = time_stamp;
}
F64 getSum() const { return mSum; }
F64 getMin() const { return mMin; }
F64 getMax() const { return mMax; }
F64 getLastValue() const { return mLastValue; }
F64 getMean() const { return mMean; }
F64 getSum() const { return mSum; }
F64 getMin() const { return mMin; }
F64 getMax() const { return mMax; }
F64 getLastValue() const { return mLastValue; }
F64 getMean() const { return mMean; }
F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mTotalSamplingTime); }
U32 getSampleCount() const { return mNumSamples; }
bool hasValue() const { return mHasValue; }
F64 getSumOfSquares() const { return mSumOfSquares; }
LLUnitImplicit<F64, LLUnits::Seconds> getSamplingTime() { return mTotalSamplingTime; }
U32 getSampleCount() const { return mNumSamples; }
bool hasValue() const { return mHasValue; }
private:
F64 mSum,
mMin,
mMax,
mLastValue;
F64 mSum,
mMin,
mMax,
mLastValue;
bool mHasValue;
bool mHasValue; // distinct from mNumSamples, since we might have inherited an old sample
F64 mMean,
mSumOfSquares;
F64 mMean,
mSumOfSquares;
LLUnitImplicit<F64, LLUnits::Seconds> mLastSampleTimeStamp,
mTotalSamplingTime;
LLUnitImplicit<F64, LLUnits::Seconds>
mLastSampleTimeStamp,
mTotalSamplingTime;
U32 mNumSamples;
U32 mNumSamples;
};
class CountAccumulator
{
public:
typedef F64 value_t;
typedef F64 mean_t;
CountAccumulator()
: mSum(0),
@ -489,7 +391,7 @@ namespace LLTrace
mSum += value;
}
void addSamples(const CountAccumulator& other, bool /*append*/)
void addSamples(const CountAccumulator& other, bool /*follows_in_sequence*/)
{
mSum += other.mSum;
mNumSamples += other.mNumSamples;
@ -517,42 +419,40 @@ namespace LLTrace
{
public:
typedef LLUnit<F64, LLUnits::Seconds> value_t;
typedef LLUnit<F64, LLUnits::Seconds> mean_t;
typedef TimeBlockAccumulator self_t;
// fake classes that allows us to view different facets of underlying statistic
struct CallCountFacet
{
typedef U32 value_t;
typedef F32 mean_t;
};
struct SelfTimeFacet
{
typedef LLUnit<F64, LLUnits::Seconds> value_t;
typedef LLUnit<F64, LLUnits::Seconds> mean_t;
};
TimeBlockAccumulator();
void addSamples(const self_t& other, bool /*append*/);
void addSamples(const self_t& other, EBufferAppendType append_type);
void reset(const self_t* other);
void sync(LLUnitImplicit<F64, LLUnits::Seconds>) {}
//
// members
//
U64 mStartTotalTimeCounter,
mTotalTimeCounter,
mSelfTimeCounter;
U32 mCalls;
class TimeBlock* mParent; // last acknowledged parent of this time block
class TimeBlock* mLastCaller; // used to bootstrap tree construction
U16 mActiveCount; // number of timers with this ID active on stack
bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame
U64 mStartTotalTimeCounter,
mTotalTimeCounter,
mSelfTimeCounter;
U32 mCalls;
class TimeBlock* mParent; // last acknowledged parent of this time block
class TimeBlock* mLastCaller; // used to bootstrap tree construction
U16 mActiveCount; // number of timers with this ID active on stack
bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame
};
class TimeBlock;
class TimeBlockTreeNode
{
public:
@ -583,19 +483,16 @@ namespace LLTrace
struct AllocationCountFacet
{
typedef U32 value_t;
typedef F32 mean_t;
};
struct DeallocationCountFacet
{
typedef U32 value_t;
typedef F32 mean_t;
};
struct ChildMemFacet
{
typedef LLUnit<F64, LLUnits::Bytes> value_t;
typedef LLUnit<F64, LLUnits::Bytes> mean_t;
};
MemStatAccumulator()
@ -603,10 +500,10 @@ namespace LLTrace
mDeallocatedCount(0)
{}
void addSamples(const MemStatAccumulator& other, bool append)
void addSamples(const MemStatAccumulator& other, EBufferAppendType append_type)
{
mSize.addSamples(other.mSize, append);
mChildSize.addSamples(other.mChildSize, append);
mSize.addSamples(other.mSize, append_type);
mChildSize.addSamples(other.mChildSize, append_type);
mAllocatedCount += other.mAllocatedCount;
mDeallocatedCount += other.mDeallocatedCount;
}
@ -645,11 +542,11 @@ namespace LLTrace
void reset(AccumulatorBufferGroup* other = NULL);
void sync();
AccumulatorBuffer<CountAccumulator> mCounts;
AccumulatorBuffer<SampleAccumulator> mSamples;
AccumulatorBuffer<EventAccumulator> mEvents;
AccumulatorBuffer<TimeBlockAccumulator> mStackTimers;
AccumulatorBuffer<MemStatAccumulator> mMemStats;
AccumulatorBuffer<CountAccumulator> mCounts;
AccumulatorBuffer<SampleAccumulator> mSamples;
AccumulatorBuffer<EventAccumulator> mEvents;
AccumulatorBuffer<TimeBlockAccumulator> mStackTimers;
AccumulatorBuffer<MemStatAccumulator> mMemStats;
};
}

View File

@ -242,9 +242,7 @@ F64 Recording::getSum( const TraceType<EventAccumulator>& stat )
F64 Recording::getPerSec( const TraceType<CountAccumulator>& stat )
{
F64 sum = mBuffers->mCounts[stat.getIndex()].getSum();
return (sum != 0.0)
? (sum / mElapsedSeconds.value())
: 0.0;
return sum / mElapsedSeconds.value();
}
U32 Recording::getSampleCount( const TraceType<CountAccumulator>& stat )
@ -252,6 +250,11 @@ U32 Recording::getSampleCount( const TraceType<CountAccumulator>& stat )
return mBuffers->mCounts[stat.getIndex()].getSampleCount();
}
bool Recording::hasValue(const TraceType<SampleAccumulator>& stat)
{
return mBuffers->mSamples[stat.getIndex()].hasValue();
}
F64 Recording::getMin( const TraceType<SampleAccumulator>& stat )
{
return mBuffers->mSamples[stat.getIndex()].getMin();
@ -282,6 +285,11 @@ U32 Recording::getSampleCount( const TraceType<SampleAccumulator>& stat )
return mBuffers->mSamples[stat.getIndex()].getSampleCount();
}
bool Recording::hasValue(const TraceType<EventAccumulator>& stat)
{
return mBuffers->mEvents[stat.getIndex()].hasValue();
}
F64 Recording::getMin( const TraceType<EventAccumulator>& stat )
{
return mBuffers->mEvents[stat.getIndex()].getMin();
@ -512,47 +520,26 @@ void PeriodicRecording::handleSplitTo(PeriodicRecording& other)
getCurRecording().splitTo(other.getCurRecording());
}
F64 PeriodicRecording::getPeriodMean( const TraceType<EventAccumulator>& stat, size_t num_periods /*= U32_MAX*/ )
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
F64 mean = 0;
if (num_periods <= 0) { return mean; }
S32 total_sample_count = 0;
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
if (mRecordingPeriods[index].getDuration() > 0.f)
{
S32 period_sample_count = mRecordingPeriods[index].getSampleCount(stat);
mean += mRecordingPeriods[index].getMean(stat) * period_sample_count;
total_sample_count += period_sample_count;
}
}
if (total_sample_count)
{
mean = mean / total_sample_count;
}
return mean;
}
F64 PeriodicRecording::getPeriodMin( const TraceType<EventAccumulator>& stat, size_t num_periods /*= U32_MAX*/ )
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
bool has_value = false;
F64 min_val = std::numeric_limits<F64>::max();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
min_val = llmin(min_val, mRecordingPeriods[index].getMin(stat));
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
min_val = llmin(min_val, recording.getMin(stat));
has_value = true;
}
}
return min_val;
return has_value
? min_val
: NaN;
}
F64 PeriodicRecording::getPeriodMax( const TraceType<EventAccumulator>& stat, size_t num_periods /*= U32_MAX*/ )
@ -560,13 +547,71 @@ F64 PeriodicRecording::getPeriodMax( const TraceType<EventAccumulator>& stat, si
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
bool has_value = false;
F64 max_val = std::numeric_limits<F64>::min();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
max_val = llmax(max_val, mRecordingPeriods[index].getMax(stat));
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
max_val = llmax(max_val, recording.getMax(stat));
has_value = true;
}
}
return max_val;
return has_value
? max_val
: NaN;
}
// calculates means using aggregates per period
F64 PeriodicRecording::getPeriodMean( const TraceType<EventAccumulator>& stat, size_t num_periods /*= U32_MAX*/ )
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
F64 mean = 0;
S32 valid_period_count = 0;
for (S32 i = 1; i <= num_periods; i++)
{
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
mean += recording.getMean(stat);
valid_period_count++;
}
}
return valid_period_count
? mean / (F64)valid_period_count
: NaN;
}
F64 PeriodicRecording::getPeriodStandardDeviation( const TraceType<EventAccumulator>& stat, size_t num_periods /*= U32_MAX*/ )
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
F64 period_mean = getPeriodMean(stat, num_periods);
F64 sum_of_squares = 0;
S32 valid_period_count = 0;
for (S32 i = 1; i <= num_periods; i++)
{
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
F64 delta = recording.getMean(stat) - period_mean;
sum_of_squares += delta * delta;
valid_period_count++;
}
}
return valid_period_count
? sqrt((F64)sum_of_squares / (F64)valid_period_count)
: NaN;
}
F64 PeriodicRecording::getPeriodMin( const TraceType<SampleAccumulator>& stat, size_t num_periods /*= U32_MAX*/ )
@ -574,13 +619,21 @@ F64 PeriodicRecording::getPeriodMin( const TraceType<SampleAccumulator>& stat, s
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
bool has_value = false;
F64 min_val = std::numeric_limits<F64>::max();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
min_val = llmin(min_val, mRecordingPeriods[index].getMin(stat));
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
min_val = llmin(min_val, recording.getMin(stat));
has_value = true;
}
}
return min_val;
return has_value
? min_val
: NaN;
}
F64 PeriodicRecording::getPeriodMax(const TraceType<SampleAccumulator>& stat, size_t num_periods /*= U32_MAX*/)
@ -588,13 +641,21 @@ F64 PeriodicRecording::getPeriodMax(const TraceType<SampleAccumulator>& stat, si
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
bool has_value = false;
F64 max_val = std::numeric_limits<F64>::min();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
max_val = llmax(max_val, mRecordingPeriods[index].getMax(stat));
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
max_val = llmax(max_val, recording.getMax(stat));
has_value = true;
}
}
return max_val;
return has_value
? max_val
: NaN;
}
@ -603,30 +664,48 @@ F64 PeriodicRecording::getPeriodMean( const TraceType<SampleAccumulator>& stat,
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
LLUnit<F64, LLUnits::Seconds> total_duration(0.f);
S32 valid_period_count = 0;
F64 mean = 0;
if (num_periods <= 0) { return mean; }
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
if (mRecordingPeriods[index].getDuration() > 0.f)
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
LLUnit<F64, LLUnits::Seconds> recording_duration = mRecordingPeriods[index].getDuration();
mean += mRecordingPeriods[index].getMean(stat) * recording_duration.value();
total_duration += recording_duration;
mean += recording.getMean(stat);
valid_period_count++;
}
}
if (total_duration.value())
{
mean = mean / total_duration;
}
return mean;
return valid_period_count
? mean / F64(valid_period_count)
: NaN;
}
F64 PeriodicRecording::getPeriodStandardDeviation( const TraceType<SampleAccumulator>& stat, size_t num_periods /*= U32_MAX*/ )
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
F64 period_mean = getPeriodMean(stat, num_periods);
S32 valid_period_count = 0;
F64 sum_of_squares = 0;
for (S32 i = 1; i <= num_periods; i++)
{
Recording& recording = getPrevRecording(i);
if (recording.hasValue(stat))
{
F64 delta = recording.getMean(stat) - period_mean;
sum_of_squares += delta * delta;
valid_period_count++;
}
}
return valid_period_count
? sqrt(sum_of_squares / (F64)valid_period_count)
: NaN;
}
///////////////////////////////////////////////////////////////////////
// ExtendableRecording

View File

@ -209,6 +209,8 @@ namespace LLTrace
// SampleStatHandle accessors
bool hasValue(const TraceType<SampleAccumulator>& stat);
F64 getMin(const TraceType<SampleAccumulator>& stat);
template <typename T>
T getMin(const SampleStatHandle<T>& stat)
@ -216,13 +218,6 @@ namespace LLTrace
return (T)getMin(static_cast<const TraceType<SampleAccumulator>&> (stat));
}
F64 getMean(const TraceType<SampleAccumulator>& stat);
template <typename T>
typename RelatedTypes<T>::fractional_t getMean(SampleStatHandle<T>& stat)
{
return (typename RelatedTypes<T>::fractional_t)getMean(static_cast<const TraceType<SampleAccumulator>&> (stat));
}
F64 getMax(const TraceType<SampleAccumulator>& stat);
template <typename T>
T getMax(const SampleStatHandle<T>& stat)
@ -230,6 +225,13 @@ namespace LLTrace
return (T)getMax(static_cast<const TraceType<SampleAccumulator>&> (stat));
}
F64 getMean(const TraceType<SampleAccumulator>& stat);
template <typename T>
typename RelatedTypes<T>::fractional_t getMean(SampleStatHandle<T>& stat)
{
return (typename RelatedTypes<T>::fractional_t)getMean(static_cast<const TraceType<SampleAccumulator>&> (stat));
}
F64 getStandardDeviation(const TraceType<SampleAccumulator>& stat);
template <typename T>
typename RelatedTypes<T>::fractional_t getStandardDeviation(const SampleStatHandle<T>& stat)
@ -247,6 +249,8 @@ namespace LLTrace
U32 getSampleCount(const TraceType<SampleAccumulator>& stat);
// EventStatHandle accessors
bool hasValue(const TraceType<EventAccumulator>& stat);
F64 getSum(const TraceType<EventAccumulator>& stat);
template <typename T>
typename RelatedTypes<T>::sum_t getSum(const EventStatHandle<T>& stat)
@ -342,8 +346,8 @@ namespace LLTrace
size_t num_samples = 0;
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
num_samples += mRecordingPeriods[index].getSampleCount(stat);
Recording& recording = getPrevRecording(i);
num_samples += Recording.getSampleCount(stat);
}
return num_samples;
}
@ -362,8 +366,8 @@ namespace LLTrace
typename T::value_t min_val = std::numeric_limits<typename T::value_t>::max();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
min_val = llmin(min_val, mRecordingPeriods[index].getSum(stat));
Recording& recording = getPrevRecording(i)
min_val = llmin(min_val, recording.getSum(stat));
}
return min_val;
}
@ -394,11 +398,11 @@ namespace LLTrace
size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
F64 min_val = std::numeric_limits<F64>::max();
RelatedTypes<typename T::value_t>::fractional_t min_val = std::numeric_limits<F64>::max();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
min_val = llmin(min_val, mRecordingPeriods[index].getPerSec(stat));
Recording& recording = getPrevRecording(i);
min_val = llmin(min_val, recording.getPerSec(stat));
}
return (typename RelatedTypes<typename T::value_t>::fractional_t) min_val;
}
@ -423,8 +427,8 @@ namespace LLTrace
typename T::value_t max_val = std::numeric_limits<typename T::value_t>::min();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
max_val = llmax(max_val, mRecordingPeriods[index].getSum(stat));
Recording& recording = getPrevRecording(i);
max_val = llmax(max_val, recording.getSum(stat));
}
return max_val;
}
@ -458,8 +462,8 @@ namespace LLTrace
F64 max_val = std::numeric_limits<F64>::min();
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
max_val = llmax(max_val, mRecordingPeriods[index].getPerSec(stat));
Recording& recording = getPrevRecording(i);
max_val = llmax(max_val, recording.getPerSec(stat));
}
return (typename RelatedTypes<typename T::value_t>::fractional_t)max_val;
}
@ -476,24 +480,24 @@ namespace LLTrace
// catch all for stats that have a defined sum
template <typename T>
typename T::mean_t getPeriodMean(const TraceType<T >& stat, size_t num_periods = U32_MAX)
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMean(const TraceType<T >& stat, size_t num_periods = U32_MAX)
{
size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
typename T::mean_t mean = 0;
if (num_periods <= 0) { return mean; }
typename RelatedTypes<T::value_t>::fractional_t mean = 0;
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
if (mRecordingPeriods[index].getDuration() > 0.f)
Recording& recording = getPrevRecording(i);
if (recording.getDuration() > 0.f)
{
mean += mRecordingPeriods[index].getSum(stat);
mean += recording.getSum(stat);
}
}
mean = mean / num_periods;
return mean;
return RelatedTypes<T::value_t>::fractional_t(num_periods
? mean / num_periods
: NaN);
}
template<typename T>
@ -516,24 +520,25 @@ namespace LLTrace
}
template <typename T>
typename RelatedTypes<typename T::mean_t>::fractional_t getPeriodMeanPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMeanPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
{
size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
typename T::mean_t mean = 0;
if (num_periods <= 0) { return mean; }
typename RelatedTypes<T::value_t>::fractional_t mean = 0;
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
if (mRecordingPeriods[index].getDuration() > 0.f)
Recording& recording = getPrevRecording(i);
if (recording.getDuration() > 0.f)
{
mean += mRecordingPeriods[index].getPerSec(stat);
mean += recording.getPerSec(stat);
}
}
mean = mean / num_periods;
return (typename RelatedTypes<typename T::mean_t>::fractional_t)mean;
return RelatedTypes<T::value_t>::fractional_t(num_periods
? mean / num_periods
: NaN);
}
template<typename T>
@ -542,6 +547,25 @@ namespace LLTrace
return typename RelatedTypes<T>::fractional_t(getPeriodMeanPerSec(static_cast<const TraceType<CountAccumulator>&>(stat), num_periods));
}
//
// PERIODIC STANDARD DEVIATION
//
F64 getPeriodStandardDeviation(const TraceType<SampleAccumulator>& stat, size_t num_periods = U32_MAX);
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const SampleStatHandle<T>& stat, size_t num_periods = U32_MAX)
{
return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const TraceType<SampleAccumulator>&>(stat), num_periods));
}
F64 getPeriodStandardDeviation(const TraceType<EventAccumulator>& stat, size_t num_periods = U32_MAX);
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const EventStatHandle<T>& stat, size_t num_periods = U32_MAX)
{
return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods));
}
private:
// implementation for LLStopWatchControlsMixin
/*virtual*/ void handleStart();

View File

@ -174,7 +174,7 @@ ThreadRecorder::active_recording_list_t::reverse_iterator ThreadRecorder::bringU
if (it == end_it)
{
llwarns << "Recording not active on this thread" << llendl;
LL_WARNS() << "Recording not active on this thread" << LL_ENDL;
}
return it;

View File

@ -517,71 +517,79 @@ struct LLGetUnitLabel<LLUnit<STORAGE_T, T> >
static const char* getUnitLabel() { return T::getUnitLabel(); }
};
template<typename VALUE_TYPE>
#define LL_UNIT_PROMOTE_VALUE(output_type, value) ((true ? (output_type)(1) : (value/value)) * value)
template<typename INPUT_TYPE, typename OUTPUT_TYPE>
struct LLUnitLinearOps
{
typedef LLUnitLinearOps<VALUE_TYPE> self_t;
LLUnitLinearOps(VALUE_TYPE val) : mResult (val) {}
typedef LLUnitLinearOps<OUTPUT_TYPE, OUTPUT_TYPE> output_t;
operator VALUE_TYPE() const { return mResult; }
VALUE_TYPE mResult;
LLUnitLinearOps(INPUT_TYPE val)
: mInput (val)
{}
operator OUTPUT_TYPE() const { return (OUTPUT_TYPE)mInput; }
INPUT_TYPE mInput;
template<typename T>
self_t operator * (T other)
output_t operator * (T other)
{
return mResult * other;
return mInput * other;
}
template<typename T>
self_t operator / (T other)
output_t operator / (T other)
{
return mResult / other;
return LL_UNIT_PROMOTE_VALUE(OUTPUT_TYPE, mInput) / other;
}
template<typename T>
self_t operator + (T other)
output_t operator + (T other)
{
return mResult + other;
return mInput + other;
}
template<typename T>
self_t operator - (T other)
output_t operator - (T other)
{
return mResult - other;
return mInput - other;
}
};
template<typename VALUE_TYPE>
template<typename INPUT_TYPE, typename OUTPUT_TYPE>
struct LLUnitInverseLinearOps
{
typedef LLUnitInverseLinearOps<VALUE_TYPE> self_t;
typedef LLUnitInverseLinearOps<OUTPUT_TYPE, OUTPUT_TYPE> output_t;
LLUnitInverseLinearOps(VALUE_TYPE val) : mResult (val) {}
operator VALUE_TYPE() const { return mResult; }
VALUE_TYPE mResult;
LLUnitInverseLinearOps(INPUT_TYPE val)
: mInput(val)
{}
operator OUTPUT_TYPE() const { return (OUTPUT_TYPE)mInput; }
INPUT_TYPE mInput;
template<typename T>
self_t operator * (T other)
output_t operator * (T other)
{
return mResult / other;
return LL_UNIT_PROMOTE_VALUE(OUTPUT_TYPE, mInput) / other;
}
template<typename T>
self_t operator / (T other)
output_t operator / (T other)
{
return mResult * other;
return mInput * other;
}
template<typename T>
self_t operator + (T other)
output_t operator + (T other)
{
return mResult - other;
return mInput - other;
}
template<typename T>
self_t operator - (T other)
output_t operator - (T other)
{
return mResult + other;
return mInput + other;
}
};
@ -613,13 +621,13 @@ struct unit_name
template<typename S1, typename S2> \
void ll_convert_units(LLUnit<S1, unit_name> in, LLUnit<S2, base_unit_name>& out) \
{ \
out = LLUnit<S2, base_unit_name>((S2)(LLUnitLinearOps<S1>(in.value()) conversion_operation)); \
out = LLUnit<S2, base_unit_name>((S2)(LLUnitLinearOps<S1, S2>(in.value()) conversion_operation)); \
} \
\
template<typename S1, typename S2> \
void ll_convert_units(LLUnit<S1, base_unit_name> in, LLUnit<S2, unit_name>& out) \
{ \
out = LLUnit<S2, unit_name>((S2)(LLUnitInverseLinearOps<S1>(in.value()) conversion_operation)); \
out = LLUnit<S2, unit_name>((S2)(LLUnitInverseLinearOps<S1, S2>(in.value()) conversion_operation)); \
}
//

View File

@ -359,7 +359,7 @@ LLURI LLURI::buildHTTP(const std::string& prefix,
it != path.endArray();
++it)
{
lldebugs << "PATH: inserting " << it->asString() << llendl;
LL_DEBUGS() << "PATH: inserting " << it->asString() << LL_ENDL;
result.mEscapedPath += "/" + escapePathComponent(it->asString());
}
}
@ -399,8 +399,8 @@ LLURI LLURI::buildHTTP(const std::string& prefix,
}
else
{
llwarns << "Valid path arguments to buildHTTP are array, string, or undef, you passed type"
<< path.type() << llendl;
LL_WARNS() << "Valid path arguments to buildHTTP are array, string, or undef, you passed type"
<< path.type() << LL_ENDL;
}
result.mEscapedOpaque = "//" + result.mEscapedAuthority +
result.mEscapedPath;
@ -584,7 +584,7 @@ LLSD LLURI::queryMap() const
// static
LLSD LLURI::queryMap(std::string escaped_query_string)
{
lldebugs << "LLURI::queryMap query params: " << escaped_query_string << llendl;
LL_DEBUGS() << "LLURI::queryMap query params: " << escaped_query_string << LL_ENDL;
LLSD result = LLSD::emptyArray();
while(!escaped_query_string.empty())
@ -610,12 +610,12 @@ LLSD LLURI::queryMap(std::string escaped_query_string)
{
std::string key = unescape(tuple.substr(0,key_end));
std::string value = unescape(tuple.substr(key_end+1));
lldebugs << "inserting key " << key << " value " << value << llendl;
LL_DEBUGS() << "inserting key " << key << " value " << value << LL_ENDL;
result[key] = value;
}
else
{
lldebugs << "inserting key " << unescape(tuple) << " value true" << llendl;
LL_DEBUGS() << "inserting key " << unescape(tuple) << " value true" << LL_ENDL;
result[unescape(tuple)] = true;
}
}

View File

@ -232,7 +232,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
{
if(emit)
{
llwarns << "Warning! Using broken UUID string format" << llendl;
LL_WARNS() << "Warning! Using broken UUID string format" << LL_ENDL;
}
broken_format = TRUE;
}
@ -242,7 +242,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
if(emit)
{
//don't spam the logs because a resident can't spell.
llwarns << "Bad UUID string: " << in_string << llendl;
LL_WARNS() << "Bad UUID string: " << in_string << LL_ENDL;
}
setNull();
return FALSE;
@ -281,7 +281,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
{
if(emit)
{
llwarns << "Invalid UUID string character" << llendl;
LL_WARNS() << "Invalid UUID string character" << LL_ENDL;
}
setNull();
return FALSE;
@ -306,7 +306,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
{
if(emit)
{
llwarns << "Invalid UUID string character" << llendl;
LL_WARNS() << "Invalid UUID string character" << LL_ENDL;
}
setNull();
return FALSE;

View File

@ -50,8 +50,8 @@ LLWorkerThread::~LLWorkerThread()
// Delete any workers in the delete queue (should be safe - had better be!)
if (!mDeleteList.empty())
{
llwarns << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size()
<< " entries in delete list." << llendl;
LL_WARNS() << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size()
<< " entries in delete list." << LL_ENDL;
}
delete mDeleteMutex;
@ -65,8 +65,8 @@ void LLWorkerThread::clearDeleteList()
// Delete any workers in the delete queue (should be safe - had better be!)
if (!mDeleteList.empty())
{
llwarns << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size()
<< " entries in delete list." << llendl;
LL_WARNS() << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size()
<< " entries in delete list." << LL_ENDL;
mDeleteMutex->lock();
for (delete_list_t::iterator iter = mDeleteList.begin(); iter != mDeleteList.end(); ++iter)
@ -142,7 +142,7 @@ LLWorkerThread::handle_t LLWorkerThread::addWorkRequest(LLWorkerClass* workercla
bool res = addRequest(req);
if (!res)
{
llerrs << "add called after LLWorkerThread::cleanupClass()" << llendl;
LL_ERRS() << "add called after LLWorkerThread::cleanupClass()" << LL_ENDL;
req->deleteRequest();
handle = nullHandle();
}
@ -209,7 +209,7 @@ LLWorkerClass::LLWorkerClass(LLWorkerThread* workerthread, const std::string& na
{
if (!mWorkerThread)
{
llerrs << "LLWorkerClass() called with NULL workerthread: " << name << llendl;
LL_ERRS() << "LLWorkerClass() called with NULL workerthread: " << name << LL_ENDL;
}
}
@ -223,12 +223,12 @@ LLWorkerClass::~LLWorkerClass()
LLWorkerThread::WorkRequest* workreq = (LLWorkerThread::WorkRequest*)mWorkerThread->getRequest(mRequestHandle);
if (!workreq)
{
llerrs << "LLWorkerClass destroyed with stale work handle" << llendl;
LL_ERRS() << "LLWorkerClass destroyed with stale work handle" << LL_ENDL;
}
if (workreq->getStatus() != LLWorkerThread::STATUS_ABORTED &&
workreq->getStatus() != LLWorkerThread::STATUS_COMPLETE)
{
llerrs << "LLWorkerClass destroyed with active worker! Worker Status: " << workreq->getStatus() << llendl;
LL_ERRS() << "LLWorkerClass destroyed with active worker! Worker Status: " << workreq->getStatus() << LL_ENDL;
}
}
}
@ -238,7 +238,7 @@ void LLWorkerClass::setWorkerThread(LLWorkerThread* workerthread)
mMutex.lock();
if (mRequestHandle != LLWorkerThread::nullHandle())
{
llerrs << "LLWorkerClass attempt to change WorkerThread with active worker!" << llendl;
LL_ERRS() << "LLWorkerClass attempt to change WorkerThread with active worker!" << LL_ENDL;
}
mWorkerThread = workerthread;
mMutex.unlock();
@ -298,10 +298,10 @@ void LLWorkerClass::addWork(S32 param, U32 priority)
llassert_always(!(mWorkFlags & (WCF_WORKING|WCF_HAVE_WORK)));
if (mRequestHandle != LLWorkerThread::nullHandle())
{
llerrs << "LLWorkerClass attempt to add work with active worker!" << llendl;
LL_ERRS() << "LLWorkerClass attempt to add work with active worker!" << LL_ENDL;
}
#if _DEBUG
// llinfos << "addWork: " << mWorkerClassName << " Param: " << param << llendl;
// LL_INFOS() << "addWork: " << mWorkerClassName << " Param: " << param << LL_ENDL;
#endif
startWork(param);
clearFlags(WCF_WORK_FINISHED|WCF_WORK_ABORTED);
@ -316,7 +316,7 @@ void LLWorkerClass::abortWork(bool autocomplete)
#if _DEBUG
// LLWorkerThread::WorkRequest* workreq = mWorkerThread->getRequest(mRequestHandle);
// if (workreq)
// llinfos << "abortWork: " << mWorkerClassName << " Param: " << workreq->getParam() << llendl;
// LL_INFOS() << "abortWork: " << mWorkerClassName << " Param: " << workreq->getParam() << LL_ENDL;
#endif
if (mRequestHandle != LLWorkerThread::nullHandle())
{

View File

@ -339,7 +339,7 @@ namespace tut
/*
if(actual != expected)
{
llwarns << "iteration " << i << llendl;
LL_WARNS() << "iteration " << i << LL_ENDL;
std::ostringstream e_str;
std::string::iterator iter = expected.begin();
std::string::iterator end = expected.end();
@ -349,8 +349,8 @@ namespace tut
}
e_str << std::endl;
llsd_serialize_string(e_str, expected);
llwarns << "expected size: " << expected.size() << llendl;
llwarns << "expected: " << e_str.str() << llendl;
LL_WARNS() << "expected size: " << expected.size() << LL_ENDL;
LL_WARNS() << "expected: " << e_str.str() << LL_ENDL;
std::ostringstream a_str;
iter = actual.begin();
@ -361,8 +361,8 @@ namespace tut
}
a_str << std::endl;
llsd_serialize_string(a_str, actual);
llwarns << "actual size: " << actual.size() << llendl;
llwarns << "actual: " << a_str.str() << llendl;
LL_WARNS() << "actual size: " << actual.size() << LL_ENDL;
LL_WARNS() << "actual: " << a_str.str() << LL_ENDL;
}
*/
ensure_equals("string value", actual, expected);

View File

@ -40,7 +40,7 @@ namespace
{
void test_that_error_h_includes_enough_things_to_compile_a_message()
{
llinfos << "!" << llendl;
LL_INFOS() << "!" << LL_ENDL;
}
}
@ -55,7 +55,7 @@ namespace tut
class TestRecorder : public LLError::Recorder
{
public:
TestRecorder() : mWantsTime(false) { }
TestRecorder() { mWantsTime = false; }
~TestRecorder() { LLError::removeRecorder(this); }
void recordMessage(LLError::ELevel level,
@ -68,7 +68,6 @@ namespace tut
void clearMessages() { mMessages.clear(); }
void setWantsTime(bool t) { mWantsTime = t; }
bool wantsTime() { return mWantsTime; }
std::string message(int n)
{
@ -82,8 +81,6 @@ namespace tut
private:
typedef std::vector<std::string> MessageVector;
MessageVector mMessages;
bool mWantsTime;
};
struct ErrorTestData
@ -144,8 +141,8 @@ namespace tut
void ErrorTestObject::test<1>()
// basic test of output
{
llinfos << "test" << llendl;
llinfos << "bob" << llendl;
LL_INFOS() << "test" << LL_ENDL;
LL_INFOS() << "bob" << LL_ENDL;
ensure_message_contains(0, "test");
ensure_message_contains(1, "bob");
@ -156,11 +153,11 @@ namespace
{
void writeSome()
{
lldebugs << "one" << llendl;
llinfos << "two" << llendl;
llwarns << "three" << llendl;
llerrs << "four" << llendl;
// fatal messages write out and addtional "error" message
LL_DEBUGS() << "one" << LL_ENDL;
LL_INFOS() << "two" << LL_ENDL;
LL_WARNS() << "three" << LL_ENDL;
// fatal messages write out an additional "error" message
LL_ERRS() << "four" << LL_ENDL;
}
};
@ -259,19 +256,20 @@ namespace
std::string writeReturningLocation()
{
llinfos << "apple" << llendl; int this_line = __LINE__;
LL_INFOS() << "apple" << LL_ENDL; int this_line = __LINE__;
return locationString(this_line);
}
std::string writeReturningLocationAndFunction()
void writeReturningLocationAndFunction(std::string& location, std::string& function)
{
llinfos << "apple" << llendl; int this_line = __LINE__;
return locationString(this_line) + __FUNCTION__;
LL_INFOS() << "apple" << LL_ENDL; int this_line = __LINE__;
location = locationString(this_line);
function = __FUNCTION__;
}
std::string errorReturningLocation()
{
llerrs << "die" << llendl; int this_line = __LINE__;
LL_ERRS() << "die" << LL_ENDL; int this_line = __LINE__;
return locationString(this_line);
}
}
@ -306,13 +304,13 @@ namespace tut
std::string logFromGlobal(bool id)
{
llinfos << (id ? "logFromGlobal: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "logFromGlobal: " : "") << "hi" << LL_ENDL;
return "logFromGlobal";
}
static std::string logFromStatic(bool id)
{
llinfos << (id ? "logFromStatic: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "logFromStatic: " : "") << "hi" << LL_ENDL;
return "logFromStatic";
}
@ -320,7 +318,7 @@ namespace
{
std::string logFromAnon(bool id)
{
llinfos << (id ? "logFromAnon: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "logFromAnon: " : "") << "hi" << LL_ENDL;
return "logFromAnon";
}
}
@ -328,7 +326,7 @@ namespace
namespace Foo {
std::string logFromNamespace(bool id)
{
llinfos << (id ? "Foo::logFromNamespace: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "Foo::logFromNamespace: " : "") << "hi" << LL_ENDL;
//return "Foo::logFromNamespace";
// there is no standard way to get the namespace name, hence
// we won't be testing for it
@ -342,12 +340,12 @@ namespace
public:
std::string logFromMember(bool id)
{
llinfos << (id ? "ClassWithNoLogType::logFromMember: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithNoLogType::logFromMember: " : "") << "hi" << LL_ENDL;
return "ClassWithNoLogType::logFromMember";
}
static std::string logFromStatic(bool id)
{
llinfos << (id ? "ClassWithNoLogType::logFromStatic: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithNoLogType::logFromStatic: " : "") << "hi" << LL_ENDL;
return "ClassWithNoLogType::logFromStatic";
}
};
@ -357,12 +355,12 @@ namespace
public:
std::string logFromMember(bool id)
{
llinfos << (id ? "ClassWithLogType::logFromMember: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithLogType::logFromMember: " : "") << "hi" << LL_ENDL;
return "ClassWithLogType::logFromMember";
}
static std::string logFromStatic(bool id)
{
llinfos << (id ? "ClassWithLogType::logFromStatic: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithLogType::logFromStatic: " : "") << "hi" << LL_ENDL;
return "ClassWithLogType::logFromStatic";
}
};
@ -434,19 +432,19 @@ namespace
{
std::string innerLogger()
{
llinfos << "inside" << llendl;
LL_INFOS() << "inside" << LL_ENDL;
return "moo";
}
std::string outerLogger()
{
llinfos << "outside(" << innerLogger() << ")" << llendl;
LL_INFOS() << "outside(" << innerLogger() << ")" << LL_ENDL;
return "bar";
}
void uberLogger()
{
llinfos << "uber(" << outerLogger() << "," << innerLogger() << ")" << llendl;
LL_INFOS() << "uber(" << outerLogger() << "," << innerLogger() << ")" << LL_ENDL;
}
class LogWhileLogging
@ -454,7 +452,7 @@ namespace
public:
void print(std::ostream& out) const
{
llinfos << "logging" << llendl;
LL_INFOS() << "logging" << LL_ENDL;
out << "baz";
}
};
@ -465,7 +463,7 @@ namespace
void metaLogger()
{
LogWhileLogging l;
llinfos << "meta(" << l << ")" << llendl;
LL_INFOS() << "meta(" << l << ")" << LL_ENDL;
}
}
@ -495,7 +493,7 @@ namespace tut
}
template<> template<>
// special handling of llerrs calls
// special handling of LL_ERRS() calls
void ErrorTestObject::test<8>()
{
LLError::setPrintLocation(false);
@ -518,7 +516,7 @@ namespace
void ufoSighting()
{
llinfos << "ufo" << llendl;
LL_INFOS() << "ufo" << LL_ENDL;
}
}
@ -548,11 +546,13 @@ namespace tut
LLError::setPrintLocation(true);
LLError::setTimeFunction(roswell);
mRecorder->setWantsTime(true);
std::string locationAndFunction = writeReturningLocationAndFunction();
std::string location,
function;
writeReturningLocationAndFunction(location, function);
ensure_equals("order is time type location function message",
ensure_equals("order is location time type function message",
mRecorder->message(0),
roswell() + " INFO: " + locationAndFunction + ": apple");
location + roswell() + " INFO: " + function + ": apple");
}
template<> template<>
@ -562,7 +562,7 @@ namespace tut
TestRecorder* altRecorder(new TestRecorder);
LLError::addRecorder(altRecorder);
llinfos << "boo" << llendl;
LL_INFOS() << "boo" << LL_ENDL;
ensure_message_contains(0, "boo");
ensure_equals("alt recorder count", altRecorder->countMessages(), 1);
@ -574,7 +574,7 @@ namespace tut
anotherRecorder->setWantsTime(true);
LLError::addRecorder(anotherRecorder);
llinfos << "baz" << llendl;
LL_INFOS() << "baz" << LL_ENDL;
std::string when = roswell();
@ -590,10 +590,10 @@ class TestAlpha
{
LOG_CLASS(TestAlpha);
public:
static void doDebug() { lldebugs << "add dice" << llendl; }
static void doInfo() { llinfos << "any idea" << llendl; }
static void doWarn() { llwarns << "aim west" << llendl; }
static void doError() { llerrs << "ate eels" << llendl; }
static void doDebug() { LL_DEBUGS() << "add dice" << LL_ENDL; }
static void doInfo() { LL_INFOS() << "any idea" << LL_ENDL; }
static void doWarn() { LL_WARNS() << "aim west" << LL_ENDL; }
static void doError() { LL_ERRS() << "ate eels" << LL_ENDL; }
static void doAll() { doDebug(); doInfo(); doWarn(); doError(); }
};
@ -601,10 +601,10 @@ class TestBeta
{
LOG_CLASS(TestBeta);
public:
static void doDebug() { lldebugs << "bed down" << llendl; }
static void doInfo() { llinfos << "buy iron" << llendl; }
static void doWarn() { llwarns << "bad word" << llendl; }
static void doError() { llerrs << "big easy" << llendl; }
static void doDebug() { LL_DEBUGS() << "bed down" << LL_ENDL; }
static void doInfo() { LL_INFOS() << "buy iron" << LL_ENDL; }
static void doWarn() { LL_WARNS() << "bad word" << LL_ENDL; }
static void doError() { LL_ERRS() << "big easy" << LL_ENDL; }
static void doAll() { doDebug(); doInfo(); doWarn(); doError(); }
};

View File

@ -268,7 +268,7 @@ namespace tut
{
std::stringstream stream;
mFormatter->format(v, stream);
//llinfos << "checkRoundTrip: length " << stream.str().length() << llendl;
//LL_INFOS() << "checkRoundTrip: length " << stream.str().length() << LL_ENDL;
LLSD w;
mParser->reset(); // reset() call is needed since test code re-uses mParser
mParser->parse(stream, w, stream.str().size());

View File

@ -53,6 +53,7 @@ namespace tut
template<> template<>
void units_object_t::test<1>()
{
LL_INFOS("test") << "Test" << LL_ENDL;
LLUnit<F32, Quatloos> float_quatloos;
ensure(float_quatloos == 0.f);
@ -93,6 +94,11 @@ namespace tut
LLUnit<F32, Solari> solari(quatloos);
ensure(solari == 4096);
// division of integral unit
LLUnit<S32, Quatloos> single_quatloo(1);
LLUnit<F32, Latinum> quarter_latinum = single_quatloo;
ensure(quarter_latinum == 0.25f);
}
// conversions across non-base units

View File

@ -36,7 +36,7 @@ U64 str_to_U64(const std::string& str)
if (!aptr)
{
llwarns << "str_to_U64: Bad string to U64 conversion attempt: format\n" << llendl;
LL_WARNS() << "str_to_U64: Bad string to U64 conversion attempt: format\n" << LL_ENDL;
}
else
{

View File

@ -163,8 +163,8 @@ void LLCrashLogger::gatherFiles()
LLCurl::setCAFile(gDirUtilp->getCAFile());
}
llinfos << "Using log file from debug log " << mFileMap["SecondLifeLog"] << llendl;
llinfos << "Using settings file from debug log " << mFileMap["SettingsXml"] << llendl;
LL_INFOS() << "Using log file from debug log " << mFileMap["SecondLifeLog"] << LL_ENDL;
LL_INFOS() << "Using settings file from debug log " << mFileMap["SettingsXml"] << LL_ENDL;
}
else
{
@ -376,7 +376,7 @@ void LLCrashLogger::updateApplication(const std::string& message)
{
gServicePump->pump();
gServicePump->callback();
if (!message.empty()) llinfos << message << llendl;
if (!message.empty()) LL_INFOS() << message << LL_ENDL;
}
bool LLCrashLogger::init()
@ -405,13 +405,13 @@ bool LLCrashLogger::init()
"1 = always send crash report, "
"2 = never send crash report)");
// llinfos << "Loading crash behavior setting" << llendl;
// LL_INFOS() << "Loading crash behavior setting" << LL_ENDL;
// mCrashBehavior = loadCrashBehaviorSetting();
// If user doesn't want to send, bail out
if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND)
{
llinfos << "Crash behavior is never_send, quitting" << llendl;
LL_INFOS() << "Crash behavior is never_send, quitting" << LL_ENDL;
return false;
}

View File

@ -128,12 +128,12 @@ void LLImageBase::destroyPrivatePool()
// virtual
void LLImageBase::dump()
{
llinfos << "LLImageBase mComponents " << mComponents
LL_INFOS() << "LLImageBase mComponents " << mComponents
<< " mData " << mData
<< " mDataSize " << mDataSize
<< " mWidth " << mWidth
<< " mHeight " << mHeight
<< llendl;
<< LL_ENDL;
}
// virtual
@ -145,13 +145,13 @@ void LLImageBase::sanityCheck()
|| mComponents > (S8)MAX_IMAGE_COMPONENTS
)
{
llerrs << "Failed LLImageBase::sanityCheck "
LL_ERRS() << "Failed LLImageBase::sanityCheck "
<< "width " << mWidth
<< "height " << mHeight
<< "datasize " << mDataSize
<< "components " << mComponents
<< "data " << mData
<< llendl;
<< LL_ENDL;
}
}
@ -171,7 +171,7 @@ U8* LLImageBase::allocateData(S32 size)
size = mWidth * mHeight * mComponents;
if (size <= 0)
{
llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,(S32)mComponents) << llendl;
LL_ERRS() << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,(S32)mComponents) << LL_ENDL;
}
}
@ -179,14 +179,14 @@ U8* LLImageBase::allocateData(S32 size)
static const U32 MAX_BUFFER_SIZE = 4096 * 4096 * 16 ; //256 MB
if (size < 1 || size > MAX_BUFFER_SIZE)
{
llinfos << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << llendl ;
LL_INFOS() << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << LL_ENDL ;
if(mAllowOverSize)
{
llinfos << "Oversize: " << size << llendl ;
LL_INFOS() << "Oversize: " << size << LL_ENDL ;
}
else
{
llerrs << "LLImageBase::allocateData: bad size: " << size << llendl;
LL_ERRS() << "LLImageBase::allocateData: bad size: " << size << LL_ENDL;
}
}
if (!mData || size != mDataSize)
@ -196,7 +196,7 @@ U8* LLImageBase::allocateData(S32 size)
mData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!mData)
{
llwarns << "Failed to allocate image data size [" << size << "]" << llendl;
LL_WARNS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL;
size = 0 ;
mWidth = mHeight = 0 ;
mBadBufferAllocation = true ;
@ -214,7 +214,7 @@ U8* LLImageBase::reallocateData(S32 size)
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!new_datap)
{
llwarns << "Out of memory in LLImageBase::reallocateData" << llendl;
LL_WARNS() << "Out of memory in LLImageBase::reallocateData" << LL_ENDL;
return 0;
}
if (mData)
@ -232,7 +232,7 @@ const U8* LLImageBase::getData() const
{
if(mBadBufferAllocation)
{
llerrs << "Bad memory allocation for the image buffer!" << llendl ;
LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ;
}
return mData;
@ -242,7 +242,7 @@ U8* LLImageBase::getData()
{
if(mBadBufferAllocation)
{
llerrs << "Bad memory allocation for the image buffer!" << llendl ;
LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ;
}
return mData;
@ -564,7 +564,7 @@ void LLImageRaw::composite( LLImageRaw* src )
// Src and dst can be any size. Src has 4 components. Dst has 3 components.
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
{
llinfos << "compositeScaled4onto3" << llendl;
LL_INFOS() << "compositeScaled4onto3" << LL_ENDL;
LLImageRaw* dst = this; // Just for clarity.
@ -698,7 +698,7 @@ void LLImageRaw::copy(LLImageRaw* src)
{
if (!src)
{
llwarns << "LLImageRaw::copy called with a null src pointer" << llendl;
LL_WARNS() << "LLImageRaw::copy called with a null src pointer" << LL_ENDL;
return;
}
@ -1215,8 +1215,8 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip
llifstream ifs(name, llifstream::binary);
if (!ifs.is_open())
{
// SJB: changed from llinfos to lldebugs to reduce spam
lldebugs << "Unable to open image file: " << name << llendl;
// SJB: changed from LL_INFOS() to LL_DEBUGS() to reduce spam
LL_DEBUGS() << "Unable to open image file: " << name << LL_ENDL;
return false;
}
@ -1230,7 +1230,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip
if (!length)
{
llinfos << "Zero length file file: " << name << llendl;
LL_INFOS() << "Zero length file file: " << name << LL_ENDL;
return false;
}
@ -1266,7 +1266,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip
if (!success)
{
deleteData();
llwarns << "Unable to decode image" << name << llendl;
LL_WARNS() << "Unable to decode image" << name << LL_ENDL;
return false;
}
@ -1371,11 +1371,11 @@ void LLImageFormatted::dump()
{
LLImageBase::dump();
llinfos << "LLImageFormatted"
LL_INFOS() << "LLImageFormatted"
<< " mDecoding " << mDecoding
<< " mCodec " << S32(mCodec)
<< " mDecoded " << mDecoded
<< llendl;
<< LL_ENDL;
}
//----------------------------------------------------------------------------
@ -1458,11 +1458,11 @@ void LLImageFormatted::sanityCheck()
if (mCodec >= IMG_CODEC_EOF)
{
llerrs << "Failed LLImageFormatted::sanityCheck "
LL_ERRS() << "Failed LLImageFormatted::sanityCheck "
<< "decoding " << S32(mDecoding)
<< "decoded " << S32(mDecoded)
<< "codec " << S32(mCodec)
<< llendl;
<< LL_ENDL;
}
}
@ -1638,7 +1638,7 @@ void LLImageBase::generateMip(const U8* indata, U8* mipdata, S32 width, S32 heig
*(U8*)data = (U8)(((U32)(indata[0]) + indata[1] + indata[in_width] + indata[in_width+1])>>2);
break;
default:
llerrs << "generateMmip called with bad num channels" << llendl;
LL_ERRS() << "generateMmip called with bad num channels" << LL_ENDL;
}
indata += nchannels*2;
data += nchannels;
@ -1695,17 +1695,17 @@ F32 LLImageBase::calc_download_priority(F32 virtual_size, F32 visible_pixels, S3
bytes_weight *= bytes_weight;
//llinfos << "VS: " << virtual_size << llendl;
//LL_INFOS() << "VS: " << virtual_size << LL_ENDL;
F32 virtual_size_factor = virtual_size / (10.f*10.f);
// The goal is for weighted priority to be <= 0 when we've reached a point where
// we've sent enough data.
//llinfos << "BytesSent: " << bytes_sent << llendl;
//llinfos << "BytesWeight: " << bytes_weight << llendl;
//llinfos << "PreLog: " << bytes_weight * virtual_size_factor << llendl;
//LL_INFOS() << "BytesSent: " << bytes_sent << LL_ENDL;
//LL_INFOS() << "BytesWeight: " << bytes_weight << LL_ENDL;
//LL_INFOS() << "PreLog: " << bytes_weight * virtual_size_factor << LL_ENDL;
w_priority = (F32)log10(bytes_weight * virtual_size_factor);
//llinfos << "PreScale: " << w_priority << llendl;
//LL_INFOS() << "PreScale: " << w_priority << LL_ENDL;
// We don't want to affect how MANY bytes we send based on the visible pixels, but the order
// in which they're sent. We post-multiply so we don't change the zero point.

View File

@ -321,7 +321,7 @@ BOOL LLImageBMP::updateData()
mColorPalette = new U8[color_palette_size];
if (!mColorPalette)
{
llerrs << "Out of memory in LLImageBMP::updateData()" << llendl;
LL_ERRS() << "Out of memory in LLImageBMP::updateData()" << LL_ENDL;
return FALSE;
}
memcpy( mColorPalette, mdata + FILE_HEADER_SIZE + BITMAP_HEADER_SIZE + extension_size, color_palette_size ); /* Flawfinder: ignore */
@ -528,7 +528,7 @@ BOOL LLImageBMP::encode(const LLImageRaw* raw_image, F32 encode_time)
if( (2 == src_components) || (4 == src_components) )
{
llinfos << "Dropping alpha information during BMP encoding" << llendl;
LL_INFOS() << "Dropping alpha information during BMP encoding" << LL_ENDL;
}
setSize(raw_image->getWidth(), raw_image->getHeight(), dst_components);

View File

@ -77,7 +77,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp()
const S32 DATA_LEN = 26; // BMP header (14) + DIB header size (4) + width (4) + height (4)
if (!checkFileLength(DATA_LEN))
{
llwarns << "Premature end of file" << llendl;
LL_WARNS() << "Premature end of file" << LL_ENDL;
return false;
}
@ -89,7 +89,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp()
// We only support Windows bitmaps (BM), according to LLImageBMP::updateData().
if (signature[0] != 'B' || signature[1] != 'M')
{
llwarns << "Not a BMP" << llendl;
LL_WARNS() << "Not a BMP" << LL_ENDL;
return false;
}
@ -108,7 +108,7 @@ bool LLImageDimensionsInfo::getImageDimensionsTga()
// Make sure the file is long enough.
if (!checkFileLength(TGA_FILE_HEADER_SIZE + 1 /* width */ + 1 /* height */))
{
llwarns << "Premature end of file" << llendl;
LL_WARNS() << "Premature end of file" << LL_ENDL;
return false;
}
@ -127,7 +127,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng()
// Make sure the file is long enough.
if (!checkFileLength(PNG_MAGIC_SIZE + 8 + sizeof(S32) * 2 /* width, height */))
{
llwarns << "Premature end of file" << llendl;
LL_WARNS() << "Premature end of file" << LL_ENDL;
return false;
}
@ -139,7 +139,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng()
// Make sure it's a PNG file.
if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0)
{
llwarns << "Not a PNG" << llendl;
LL_WARNS() << "Not a PNG" << LL_ENDL;
return false;
}
@ -156,7 +156,7 @@ void on_jpeg_error(j_common_ptr cinfo)
{
(void) cinfo;
sJpegErrorEncountered = true;
llwarns << "Libjpeg has encountered an error!" << llendl;
LL_WARNS() << "Libjpeg has encountered an error!" << LL_ENDL;
}
bool LLImageDimensionsInfo::getImageDimensionsJpeg()
@ -177,12 +177,12 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg()
if (fread(signature, sizeof(signature), 1, fp) != 1)
{
llwarns << "Premature end of file" << llendl;
LL_WARNS() << "Premature end of file" << LL_ENDL;
return false;
}
if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0)
{
llwarns << "Not a JPEG" << llendl;
LL_WARNS() << "Not a JPEG" << LL_ENDL;
return false;
}
fseek(fp, 0, SEEK_SET); // go back to start of the file

View File

@ -52,7 +52,7 @@ S32 LLImageDXT::formatBits(EFileFormat format)
case FORMAT_RGB8: return 24;
case FORMAT_RGBA8: return 32;
default:
llerrs << "LLImageDXT::Unknown format: " << format << llendl;
LL_ERRS() << "LLImageDXT::Unknown format: " << format << LL_ENDL;
return 0;
}
};
@ -82,7 +82,7 @@ S32 LLImageDXT::formatComponents(EFileFormat format)
case FORMAT_RGB8: return 3;
case FORMAT_RGBA8: return 4;
default:
llerrs << "LLImageDXT::Unknown format: " << format << llendl;
LL_ERRS() << "LLImageDXT::Unknown format: " << format << LL_ENDL;
return 0;
}
};
@ -207,7 +207,7 @@ BOOL LLImageDXT::updateData()
if (data_size < mHeaderSize)
{
llerrs << "LLImageDXT: not enough data" << llendl;
LL_ERRS() << "LLImageDXT: not enough data" << LL_ENDL;
}
S32 ncomponents = formatComponents(mFileFormat);
setSize(width, height, ncomponents);
@ -224,7 +224,7 @@ S32 LLImageDXT::getMipOffset(S32 discard)
{
if (mFileFormat >= FORMAT_DXT1 && mFileFormat <= FORMAT_DXT5)
{
llerrs << "getMipOffset called with old (unsupported) format" << llendl;
LL_ERRS() << "getMipOffset called with old (unsupported) format" << LL_ENDL;
}
S32 width = getWidth(), height = getHeight();
S32 num_mips = calcNumMips(width, height);
@ -251,7 +251,7 @@ void LLImageDXT::setFormat()
{
case 3: mFileFormat = FORMAT_DXR1; break;
case 4: mFileFormat = FORMAT_DXR3; break;
default: llerrs << "LLImageDXT::setFormat called with ncomponents = " << ncomponents << llendl;
default: LL_ERRS() << "LLImageDXT::setFormat called with ncomponents = " << ncomponents << LL_ENDL;
}
mHeaderSize = calcHeaderSize();
}
@ -265,7 +265,7 @@ BOOL LLImageDXT::decode(LLImageRaw* raw_image, F32 time)
if (mFileFormat >= FORMAT_DXT1 && mFileFormat <= FORMAT_DXR5)
{
llwarns << "Attempt to decode compressed LLImageDXT to Raw (unsupported)" << llendl;
LL_WARNS() << "Attempt to decode compressed LLImageDXT to Raw (unsupported)" << LL_ENDL;
return FALSE;
}
@ -303,7 +303,7 @@ BOOL LLImageDXT::getMipData(LLPointer<LLImageRaw>& raw, S32 discard)
}
else if (discard < mDiscardLevel)
{
llerrs << "Request for invalid discard level" << llendl;
LL_ERRS() << "Request for invalid discard level" << LL_ENDL;
}
U8* data = getData() + getMipOffset(discard);
S32 width = 0;
@ -331,7 +331,7 @@ BOOL LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_
format = FORMAT_RGBA8;
break;
default:
llerrs << "LLImageDXT::encode: Unhandled channel number: " << ncomponents << llendl;
LL_ERRS() << "LLImageDXT::encode: Unhandled channel number: " << ncomponents << LL_ENDL;
return 0;
}
@ -422,7 +422,7 @@ bool LLImageDXT::convertToDXR()
case FORMAT_DXT4: newformat = FORMAT_DXR4; break;
case FORMAT_DXT5: newformat = FORMAT_DXR5; break;
default:
llwarns << "convertToDXR: can not convert format: " << llformat("0x%08x",getFourCC(mFileFormat)) << llendl;
LL_WARNS() << "convertToDXR: can not convert format: " << llformat("0x%08x",getFourCC(mFileFormat)) << LL_ENDL;
return false;
}
mFileFormat = newformat;
@ -433,7 +433,7 @@ bool LLImageDXT::convertToDXR()
U8* newdata = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), total_bytes);
if (!newdata)
{
llerrs << "Out of memory in LLImageDXT::convertToDXR()" << llendl;
LL_ERRS() << "Out of memory in LLImageDXT::convertToDXR()" << LL_ENDL;
return false;
}
llassert(total_bytes > 0);
@ -466,7 +466,7 @@ S32 LLImageDXT::calcDataSize(S32 discard_level)
{
if (mFileFormat == FORMAT_UNKNOWN)
{
llerrs << "calcDataSize called with unloaded LLImageDXT" << llendl;
LL_ERRS() << "calcDataSize called with unloaded LLImageDXT" << LL_ENDL;
return 0;
}
if (discard_level < 0)

View File

@ -374,7 +374,7 @@ boolean LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )
U8* new_buffer = new U8[ new_buffer_size ];
if (!new_buffer)
{
llerrs << "Out of memory in LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )" << llendl;
LL_ERRS() << "Out of memory in LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )" << LL_ENDL;
return FALSE;
}
memcpy( new_buffer, self->mOutputBuffer, self->mOutputBufferSize ); /* Flawfinder: ignore */
@ -465,7 +465,7 @@ void LLImageJPEG::errorOutputMessage( j_common_ptr cinfo )
LLImage::setLastError(error);
BOOL is_decode = (cinfo->is_decompressor != 0);
llwarns << "LLImageJPEG " << (is_decode ? "decode " : "encode ") << " failed: " << buffer << llendl;
LL_WARNS() << "LLImageJPEG " << (is_decode ? "decode " : "encode ") << " failed: " << buffer << LL_ENDL;
}
BOOL LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )

View File

@ -266,7 +266,7 @@ BOOL LLImageTGA::updateData()
mColorMap = new U8[ color_map_bytes ];
if (!mColorMap)
{
llerrs << "Out of Memory in BOOL LLImageTGA::updateData()" << llendl;
LL_ERRS() << "Out of Memory in BOOL LLImageTGA::updateData()" << LL_ENDL;
return FALSE;
}
memcpy( mColorMap, getData() + mDataOffset, color_map_bytes ); /* Flawfinder: ignore */
@ -1043,7 +1043,7 @@ BOOL LLImageTGA::decodeAndProcess( LLImageRaw* raw_image, F32 domain, F32 weight
// Only works for unflipped monochrome RLE images
if( (getComponents() != 1) || (mImageType != 11) || mOriginTopBit || mOriginRightBit )
{
llerrs << "LLImageTGA trying to alpha-gradient process an image that's not a standard RLE, one component image" << llendl;
LL_ERRS() << "LLImageTGA trying to alpha-gradient process an image that's not a standard RLE, one component image" << LL_ENDL;
return FALSE;
}
@ -1151,7 +1151,7 @@ bool LLImageTGA::loadFile( const std::string& path )
LLFILE* file = LLFile::fopen(path, "rb"); /* Flawfinder: ignore */
if( !file )
{
llwarns << "Couldn't open file " << path << llendl;
LL_WARNS() << "Couldn't open file " << path << LL_ENDL;
return false;
}
@ -1167,7 +1167,7 @@ bool LLImageTGA::loadFile( const std::string& path )
if( bytes_read != file_size )
{
deleteData();
llwarns << "Couldn't read file " << path << llendl;
LL_WARNS() << "Couldn't read file " << path << LL_ENDL;
return false;
}
@ -1175,7 +1175,7 @@ bool LLImageTGA::loadFile( const std::string& path )
if( !updateData() )
{
llwarns << "Couldn't decode file " << path << llendl;
LL_WARNS() << "Couldn't decode file " << path << LL_ENDL;
deleteData();
return false;
}

Some files were not shown because too many files have changed in this diff Show More