本文整理汇总了C++中oop类的典型用法代码示例。如果您正苦于以下问题:C++ oop类的具体用法?C++ oop怎么用?C++ oop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了oop类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: value
// Accessors
static typeArrayOop value(oop java_string) {
assert(initialized && (value_offset > 0), "Must be initialized");
assert(is_instance(java_string), "must be java_string");
return (typeArrayOop) java_string->obj_field(value_offset);
}
开发者ID:BunnyWei,项目名称:truffle-llvmir,代码行数:6,代码来源:javaClasses.hpp
示例2: oop_is_parsable
bool symbolKlass::oop_is_parsable(oop obj) const {
assert(obj->is_symbol(),"must be a symbol");
symbolOop s = symbolOop(obj);
return s->object_is_parsable();
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:5,代码来源:symbolKlass.cpp
示例3: oop_push_contents
void symbolKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
assert(obj->is_symbol(), "should be symbol");
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:3,代码来源:symbolKlass.cpp
示例4: assert
void ThreadShadow::set_pending_exception(oop exception, const char* file, int line) {
assert(exception != NULL && exception->is_oop(), "invalid exception oop");
_pending_exception = exception;
_exception_file = file;
_exception_line = line;
}
开发者ID:benbenolson,项目名称:hotspot_9_mc,代码行数:6,代码来源:exceptions.cpp
示例5: warning
oop Profiler::copy_call_graph(oop method_pt, oop block_pt, oop access_pt,
oop prim_pt, oop leaf_pt, oop fold_pt,
oop unknown_oop,
smi cutoff_pct) {
ResourceMark rm;
if ( ProfilerIgnoreCallGraph || !root->edges ) {
// If the call graph is ignored the root contains the
// accumulated timing and allocation information
if (!this->root->edges)
warning("Profiler::copy_call_graph: root edges are NULL, profiled program probably was too brief");
oop node = leaf_pt->clone(CANFAIL);
if (node == failedAllocationOop) return failedAllocationOop;
leaf_node_info* leaf_pt_info = new leaf_node_info(leaf_pt);
leaf_pt_info->fill(node, root);
return node;
}
if ( PrintProfiling ) {
// Old debugging code; checking for multiple roots -- dmu 2/04
int c; float t;
graph_totaller::compute_totals(root_edge, c, t);
lprintf("in copy_call_graph: count = %d, time = %g\n", c, t);
lprintf(" and root and rootedge are ");
{
for (call_graph_edge* e = root_edge; e; e = e->next) {
e->callee->print_node(), lprintf("\n");
for (call_graph_edge* ee = e->callee->edges; ee; ee = ee->next)
lprintf(" "), ee->callee->print_node(), lprintf("\n");
}
}
lprintf("\n\n");
}
// Prepare for the enumeration by collecting all referred maps in the graph.
MapTable graph_maps;
{
ResourceMark rm2;
map_collector collector(this->root->edges, &graph_maps);
_collector = &collector;
switchToVMStack(cont_collect);
}
// Enumerate the maps
{
ResourceMark rm2;
map_enumeration enumeration(&graph_maps);
enumeration.enumerate();
}
graph_creator creator(this->root->edges, &graph_maps,
method_pt, block_pt, access_pt,
prim_pt, leaf_pt, fold_pt, unknown_oop, cutoff_pct);
// Do the recursive graph traversal on the VM stack.
_creator = &creator;
switchToVMStack(cont_copy);
graph_maps.deallocate();
return creator.ran_out_of_memory() ? failedAllocationOop : creator.root();
}
开发者ID:AdamSpitz,项目名称:self,代码行数:64,代码来源:nprofiler.copygraph.cpp
示例6: do_object
void do_object(oop obj) {
obj->init_mark();
}
开发者ID:BunnyWei,项目名称:truffle-llvmir,代码行数:3,代码来源:defNewGeneration.cpp
示例7: set_count
static void set_count( oop string, int count) {
assert(initialized, "Must be initialized");
if (count_offset > 0) {
string->int_field_put(count_offset, count);
}
}
开发者ID:BunnyWei,项目名称:truffle-llvmir,代码行数:6,代码来源:javaClasses.hpp
示例8: hash
static unsigned int hash(oop java_string) {
assert(initialized && (hash_offset > 0), "Must be initialized");
assert(is_instance(java_string), "must be java_string");
return java_string->int_field(hash_offset);
}
开发者ID:BunnyWei,项目名称:truffle-llvmir,代码行数:5,代码来源:javaClasses.hpp
示例9: clone_access_node_pt
oop graph_creator::clone_access_node_pt(access_node* n) {
oop oop_node= access_node_pt->clone(CANFAIL);
if (oop_node == failedAllocationOop) return failedAllocationOop;
access_pt_info->fill(this, oop_node, n);
return oop_node;
}
开发者ID:AdamSpitz,项目名称:self,代码行数:6,代码来源:nprofiler.copygraph.cpp
示例10: clone_leaf_node_pt
oop graph_creator::clone_leaf_node_pt(leaf_node* n) {
oop oop_node= leaf_node_pt->clone(CANFAIL);
if (oop_node == failedAllocationOop) return failedAllocationOop;
leaf_pt_info->fill(oop_node, n);
return oop_node;
}
开发者ID:AdamSpitz,项目名称:self,代码行数:6,代码来源:nprofiler.copygraph.cpp
示例11: return
bool DefNewGeneration::IsAliveClosure::do_object_b(oop p) {
return (HeapWord*)p >= _g->reserved().end() || p->is_forwarded();
}
开发者ID:BunnyWei,项目名称:truffle-llvmir,代码行数:3,代码来源:defNewGeneration.cpp
示例12: assert
int methodKlass::oop_size(oop obj) const {
assert(obj->is_method(), "must be method oop");
return methodOop(obj)->object_size();
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:4,代码来源:methodKlass.cpp
示例13: ov_size_prim
oop objVectorOopClass::ov_size_prim(oop rcvr) {
if (!rcvr->is_objVector()) return ErrorCodes::vmString_prim_error(BADTYPEERROR);
return as_smiOop(objVectorOop(rcvr)->length());
}
开发者ID:ardeujho,项目名称:self,代码行数:4,代码来源:objVectorOop.cpp
示例14: check_selector_string
void abstract_interpreter::check_selector_string(abstract_interpreter *ai, oop s) {
if ( s->is_string() ) return;
ai->set_error_msg( "selector must be a string");
}
开发者ID:AaronNGray,项目名称:self,代码行数:4,代码来源:abstract_interpreter.cpp
示例15:
inline bool HRInto_G1RemSet::self_forwarded(oop obj) {
bool result = (obj->is_forwarded() && (obj->forwardee()== obj));
return result;
}
开发者ID:ismo1652,项目名称:jvmnotebook,代码行数:4,代码来源:g1RemSet.inline.hpp
示例16: oop_size
int symbolKlass::oop_size(oop obj) const {
assert(obj->is_symbol(),"must be a symbol");
symbolOop s = symbolOop(obj);
int size = s->object_size();
return size;
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:6,代码来源:symbolKlass.cpp
示例17: trace_method_handle_stub
void trace_method_handle_stub(const char* adaptername,
oop mh,
intptr_t* saved_regs,
intptr_t* entry_sp) {
// called as a leaf from native code: do not block the JVM!
bool has_mh = (strstr(adaptername, "/static") == NULL &&
strstr(adaptername, "linkTo") == NULL); // static linkers don't have MH
const char* mh_reg_name = has_mh ? "rcx_mh" : "rcx";
tty->print_cr("MH %s %s="PTR_FORMAT" sp="PTR_FORMAT,
adaptername, mh_reg_name,
(void *)mh, entry_sp);
if (Verbose) {
tty->print_cr("Registers:");
const int saved_regs_count = RegisterImpl::number_of_registers;
for (int i = 0; i < saved_regs_count; i++) {
Register r = as_Register(i);
// The registers are stored in reverse order on the stack (by pusha).
tty->print("%3s=" PTR_FORMAT, r->name(), saved_regs[((saved_regs_count - 1) - i)]);
if ((i + 1) % 4 == 0) {
tty->cr();
} else {
tty->print(", ");
}
}
tty->cr();
{
// dumping last frame with frame::describe
JavaThread* p = JavaThread::active();
ResourceMark rm;
PRESERVE_EXCEPTION_MARK; // may not be needed by safer and unexpensive here
FrameValues values;
// Note: We want to allow trace_method_handle from any call site.
// While trace_method_handle creates a frame, it may be entered
// without a PC on the stack top (e.g. not just after a call).
// Walking that frame could lead to failures due to that invalid PC.
// => carefully detect that frame when doing the stack walking
// Current C frame
frame cur_frame = os::current_frame();
// Robust search of trace_calling_frame (independant of inlining).
// Assumes saved_regs comes from a pusha in the trace_calling_frame.
assert(cur_frame.sp() < saved_regs, "registers not saved on stack ?");
frame trace_calling_frame = os::get_sender_for_C_frame(&cur_frame);
while (trace_calling_frame.fp() < saved_regs) {
trace_calling_frame = os::get_sender_for_C_frame(&trace_calling_frame);
}
// safely create a frame and call frame::describe
intptr_t *dump_sp = trace_calling_frame.sender_sp();
intptr_t *dump_fp = trace_calling_frame.link();
bool walkable = has_mh; // whether the traced frame shoud be walkable
if (walkable) {
// The previous definition of walkable may have to be refined
// if new call sites cause the next frame constructor to start
// failing. Alternatively, frame constructors could be
// modified to support the current or future non walkable
// frames (but this is more intrusive and is not considered as
// part of this RFE, which will instead use a simpler output).
frame dump_frame = frame(dump_sp, dump_fp);
dump_frame.describe(values, 1);
} else {
// Stack may not be walkable (invalid PC above FP):
// Add descriptions without building a Java frame to avoid issues
values.describe(-1, dump_fp, "fp for #1 <not parsed, cannot trust pc>");
values.describe(-1, dump_sp, "sp for #1");
}
values.describe(-1, entry_sp, "raw top of stack");
tty->print_cr("Stack layout:");
values.print(p);
}
if (has_mh && mh->is_oop()) {
mh->print();
if (java_lang_invoke_MethodHandle::is_instance(mh)) {
if (java_lang_invoke_MethodHandle::form_offset_in_bytes() != 0)
java_lang_invoke_MethodHandle::form(mh)->print();
}
}
}
}
开发者ID:apurtell,项目名称:jdk8u-hotspot,代码行数:88,代码来源:methodHandles_x86.cpp
示例18: oop_follow_contents
void symbolKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
assert (obj->is_symbol(), "object must be symbol");
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::symbolKlassObj never moves.
// Note: do not follow next link here (see SymbolTable::follow_contents)
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:6,代码来源:symbolKlass.cpp
示例19:
bool MarkSweep::IsAliveClosure::do_object_b(oop p) { return p->is_gc_marked(); }
开发者ID:BaHbKaTX,项目名称:openjdk,代码行数:1,代码来源:markSweep.cpp
示例20: oop_update_pointers
int symbolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
HeapWord* beg_addr, HeapWord* end_addr) {
assert(obj->is_symbol(), "should be symbol");
return symbolOop(obj)->object_size();
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:5,代码来源:symbolKlass.cpp
注:本文中的oop类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论