Bug 792581 - part 6: Replace LL_UCMP macro with standard comparison. r=ehsan
authorAndrew Quartey <andrew.quartey@gmail.com>
Wed, 03 Oct 2012 10:13:19 -0400
changeset 109180 066fea4aa2855a092e6479058329ae8cff01550e
parent 109179 586070a8d3f1001aa5173574102cdc4f49e88480
child 109181 65404c2b69c4d499d1f49771e3eab0e40685df8e
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersehsan
bugs792581
milestone18.0a1
Bug 792581 - part 6: Replace LL_UCMP macro with standard comparison. r=ehsan
tools/trace-malloc/spacetrace.c
--- a/tools/trace-malloc/spacetrace.c
+++ b/tools/trace-malloc/spacetrace.c
@@ -961,18 +961,18 @@ harvestRun(const STRun * aInRun, STRun *
                 }
 
                 /*
                  ** Check weight restrictions.
                  */
                 LL_UI2L(bytesize64, bytesize);
                 LL_UI2L(lifetime64, lifetime);
                 LL_MUL(weight64, bytesize64, lifetime64);
-                if (LL_UCMP(weight64, <, aOptions->mWeightMin64) ||
-                    LL_UCMP(weight64, >, aOptions->mWeightMax64)) {
+                if (weight64 < aOptions->mWeightMin64 ||
+                    weight64 > aOptions->mWeightMax64) {
                     continue;
                 }
 
                 /*
                  ** Possibly restrict the callsite by text.
                  ** Do this last, as it is a heavier check.
                  **
                  ** One day, we may need to expand the logic to check for
@@ -1104,20 +1104,20 @@ compareAllocations(const void *aAlloc1, 
                     LL_UI2L(timeval164,
                             (alloc1->mMaxTimeval - alloc1->mMinTimeval));
                     LL_MUL(weight164, bytesize164, timeval164);
                     LL_UI2L(bytesize264, byteSize(inOptions, alloc2));
                     LL_UI2L(timeval264,
                             (alloc2->mMaxTimeval - alloc2->mMinTimeval));
                     LL_MUL(weight264, bytesize264, timeval264);
 
-                    if (LL_UCMP(weight164, <, weight264)) {
+                    if (weight164 < weight264) {
                         retval = __LINE__;
                     }
-                    else if (LL_UCMP(weight164, >, weight264)) {
+                    else if (weight164 > weight264) {
                         retval = -__LINE__;
                     }
                 }
                 break;
 
             case ST_SIZE:
                 {
                     uint32_t size1 = byteSize(inOptions, alloc1);
@@ -3262,20 +3262,20 @@ compareCallsites(const void *aSite1, con
                  ** Logic determined by pref/option.
                  */
                 switch (inRequest->mOptions.mOrderBy) {
                 case ST_WEIGHT:
                     {
                         uint64_t weight164 = stats1->mWeight64;
                         uint64_t weight264 = stats2->mWeight64;
 
-                        if (LL_UCMP(weight164, <, weight264)) {
+                        if (weight164 < weight264) {
                             retval = __LINE__;
                         }
-                        else if (LL_UCMP(weight164, >, weight264)) {
+                        else if (weight164 > weight264) {
                             retval = -__LINE__;
                         }
                     }
                     break;
 
                 case ST_SIZE:
                     {
                         uint32_t size1 = stats1->mSize;
@@ -3290,20 +3290,20 @@ compareCallsites(const void *aSite1, con
                     }
                     break;
 
                 case ST_TIMEVAL:
                     {
                         uint64_t timeval164 = stats1->mTimeval64;
                         uint64_t timeval264 = stats2->mTimeval64;
 
-                        if (LL_UCMP(timeval164, <, timeval264)) {
+                        if (timeval164 < timeval264) {
                             retval = __LINE__;
                         }
-                        else if (LL_UCMP(timeval164, >, timeval264)) {
+                        else if (timeval164 > timeval264) {
                             retval = -__LINE__;
                         }
                     }
                     break;
 
                 case ST_COUNT:
                     {
                         uint32_t count1 = stats1->mCompositeCount;
@@ -4460,20 +4460,20 @@ graphWeight(STRequest * inRequest, STRun
             uint64_t maxWeight64 = LL_INIT(0, 0);
             int transparent = 0;
             gdImagePtr graph = NULL;
 
             /*
              ** Go through and find the minimum and maximum weights.
              */
             for (traverse = 0; traverse < STGD_SPACE_X; traverse++) {
-                if (LL_UCMP(YData64[traverse], <, minWeight64)) {
+                if (YData64[traverse] < minWeight64) {
                     minWeight64 = YData64[traverse];
                 }
-                if (LL_UCMP(YData64[traverse], >, maxWeight64)) {
+                if (YData64[traverse] > maxWeight64) {
                     maxWeight64 = YData64[traverse];
                 }
             }
 
             /*
              ** We can now draw the graph.
              */
             graph = createGraph(&transparent);