Skip to content

Commit

Permalink
Revert "Include guid in BSLS_REVIEW (via cheapstack) (#4725)" (#4765)
Browse files Browse the repository at this point in the history
This reverts commit 2c52f74.
  • Loading branch information
jfevold-bbg authored and GitHub Enterprise committed May 24, 2024
1 parent aa37bcf commit 0d0d1a5
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 301 deletions.
83 changes: 0 additions & 83 deletions groups/bsl/bsls/bsls_stackaddressutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ BSLS_IDENT("$Id$ $CSID$")

#include <bsls_bsltestutil.h>
#include <bsls_platform.h>
#include <bsls_stackaddressutil_plinktimestamp.h>
#include <bsls_types.h>
#include <assert.h>
#include <stdio.h>
Expand Down Expand Up @@ -267,78 +266,6 @@ uintptr_t getStackOffset()
} // close unnamed namespace


namespace {

const char *getPwhatVar(const char *const tag)
// Return the 'pwhat' variable with the specified 'tag'. The behavior is
// undefined unless 'tag' is a non-empty null-terminated string. Return
// '0' if the 'plink_timestamp___' global variable does not contain the
// 'tag' or is not well formed.
{
// This is a modified version of 'sysutil_pwhat_getvar', adjusted to not
// use additional static data and to be more resilient if
// 'plink_timestamp___' is not formed as expected.

assert(0 != tag);

size_t taglength = strlen(tag);
assert(taglength > 0);

// Assume that 'plink_timestamp___' is a '0'-terminated list of
// '0'-terminated strings. Each string should roughly match the regular
// expression '[^]]*] (?<tag>[A-Z]+) *: (?<value>.*)'.

for (int i = 0; 0 != plink_timestamp___[i]; ++i) {

// search through '[^]]*]'
const char *p = strchr(plink_timestamp___[i], ']');
if (0 == p) {
continue;
}
++p;

// make sure the next character is ' '
if (' ' != *p) {
continue;
}
++p;

// see if the desired 'tag' is next
if (0 != strncmp(p,tag,taglength)) {
continue;
}
p += taglength;

// identify if ' *:' is next and advance past the ':'
switch (*p) {
case ' ': {
p = strchr(p,':');
} break;
case ':': {
} break;
default: {
// this is an invalid line or a tag that has the requested tag as a
// prefix.
continue;
} break;
}
++p;

// make sure the next character is ' ' (again)
if (' ' != *p) {
continue;
}
++p;

// the remaining part of this string is the value for the requested
// 'tag'
return p; // RETURN
}

return 0;
}

} // close unnamed namespace

namespace BloombergLP {

Expand Down Expand Up @@ -678,16 +605,6 @@ void StackAddressUtil::formatCheapStack(char *output,
return; // RETURN
}

const char *guid = getPwhatVar("GUID");
if (0 != guid && 0 != *guid) {
printed = snprintf(out, rem, "-g %s ", guid);
out += printed;
rem -= printed;
if (printed < 0 || rem <= 0) {
return; // RETURN
}
}

#if defined(BSLS_PLATFORM_OS_AIX)
// On AIX cheapstack expects the stack addresses to be offset based on
// where the text segment was actually loaded - see DRQS 19990260, DRQS
Expand Down
37 changes: 0 additions & 37 deletions groups/bsl/bsls/bsls_stackaddressutil_plinktimestamp.cpp

This file was deleted.

42 changes: 0 additions & 42 deletions groups/bsl/bsls/bsls_stackaddressutil_plinktimestamp.h

This file was deleted.

138 changes: 0 additions & 138 deletions groups/bsl/bsls/bsls_stackaddressutil_plinktimestamp.t.cpp

This file was deleted.

1 change: 0 additions & 1 deletion groups/bsl/bsls/package/bsls.mem
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ bsls_review
bsls_review_macroreset
bsls_spinlock
bsls_stackaddressutil
bsls_stackaddressutil_plinktimestamp
bsls_stopwatch
bsls_systemclocktype
bsls_systemtime
Expand Down

0 comments on commit 0d0d1a5

Please sign in to comment.