Example #1
0
void sinsp::enable_tracers_capture()
{
#if defined(HAS_CAPTURE)
	if(!m_is_tracers_capture_enabled)
	{
		if(is_live() && m_h != NULL)
		{
			if(scap_enable_tracers_capture(m_h) != SCAP_SUCCESS)
			{
				throw sinsp_exception("error enabling tracers capture");
			}
		}

		m_is_tracers_capture_enabled = true;
	}
#endif
}
Example #2
0
bool vframeOopClass::verify() {
  bool flag = slotsOopClass::verify();
  if (flag && is_live()) {
    if (next() != NULL && !next()->is_vframe()) {
      error1("vframeOop %#lx: next isn't a vframeOop", this);
      flag = false;
    }
    if (!method()->has_code()) {
      error1("vframeOop %#lx: method doesn't have code", this);
      flag = false;
    }
    if (!oop(locals())->is_smi()) {
      error1("vframeOop %#lx: locals ptr isn't a smi", this);
      flag = false;
    }
    frame* f = fr();
    if (!oop(f)->is_smi()) {
      error1("vframeOop %#lx: frame ptr isn't a smi", this);
      flag = false;
    }
    if (!descOffset()->is_smi()) {
      error1("vframeOop %#lx: desc isn't a smi", this);
      flag = false;
    }
#   if defined(FAST_COMPILER) || defined(SIC_COMPILER)
      if (f->is_compiled_self_frame()) {
        nmethod* nm = f->code();
        ScopeDesc* d = nm->scopes->at(descOffset());
        if (!nm->scopes->includes(d)) {
          error1("vframeOop %#lx: desc isn't a valid scope offset", this);
          flag = false;
        }
      }
#   endif
  }
  return flag;
}
Example #3
0
abstract_vframe* vframeOopClass::as_vframe() {
  assert(is_live()  ||  (lprintf("vframeOop 0x%x is dead\n", this), false),
         "not live");
  return new_vframe(fr(), descOffset());
}