This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

context allocation failure


I get this error when running the following command with the latest build of SystemTap:

[root@home ]# stap -ve 'probe kernel.syscall.access {}'
ERROR: percpu context (size 154348) allocation failed

Where the alias kernel.syscall.access is defined as: (see src/tapset/system_calls.stp)

probe kernel.syscall.access =
  kernel.function("sys_access") {
     name = "access"
     pathname_uaddr = $filename
     mode = $mode
     mode_str = _access_mode_str($mode)
  }

The script generates 28,641 lines of C code. If I comment the reference to _access_mode_str()
(found in tapset aux_syscalls.stp) the script generates 17,440 lines of code. The function
_access_mode_str() is defined as:


function _access_mode_str(m) {
  if(m & 4) bs="R_OK|".bs
  if(m & 2) bs="W_OK|".bs
  if(m & 1) bs="X_OK|".bs
  if((m & 3) == 0) bs="F_OK|".bs
  return substr(bs,0,strlen(bs)-1)
}

The problem is that reference to a single helper function will translate the entire contents
of the file in which it is contained. In this case 10,000+ lines of C code. Perhaps only the
functions that are being used by the script should be translated. The following will prevent
such an error message:


[root@home ]# stap -DMAXNESTING=10 -e 'probe kernel.syscall.access {}'

Before today, I never encountered this behavior. I suspect that it is one of the most recent
CVS commits that generates the error.


--
Kevin Stafford
DES 2 | MS 2M3
Beaverton - OR
Linux Technology Center
IBM Systems & Technology
Phone: 1-503-578-3039
Email: kevinrs@us.ibm.com




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]