hotspot/src/share/vm/shark/sharkIntrinsics.cpp
changeset 45514 0fc9cc73ce45
parent 33606 af4ec8a4635b
equal deleted inserted replaced
45513:5431282d8ce1 45514:0fc9cc73ce45
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright 2009 Red Hat, Inc.
     3  * Copyright 2009 Red Hat, Inc.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
    64     // java.lang.Thread
    64     // java.lang.Thread
    65   case vmIntrinsics::_currentThread:
    65   case vmIntrinsics::_currentThread:
    66     return true;
    66     return true;
    67 
    67 
    68     // Unsafe
    68     // Unsafe
    69   case vmIntrinsics::_compareAndSwapInt:
    69   case vmIntrinsics::_compareAndSetInt:
    70     return true;
    70     return true;
    71 
    71 
    72   default:
    72   default:
    73     if (SharkPerformanceWarnings) {
    73     if (SharkPerformanceWarnings) {
    74       warning(
    74       warning(
   138   case vmIntrinsics::_currentThread:
   138   case vmIntrinsics::_currentThread:
   139     do_Thread_currentThread();
   139     do_Thread_currentThread();
   140     break;
   140     break;
   141 
   141 
   142     // Unsafe
   142     // Unsafe
   143   case vmIntrinsics::_compareAndSwapInt:
   143   case vmIntrinsics::_compareAndSetInt:
   144     do_Unsafe_compareAndSwapInt();
   144     do_Unsafe_compareAndSetInt();
   145     break;
   145     break;
   146 
   146 
   147   default:
   147   default:
   148     ShouldNotReachHere();
   148     ShouldNotReachHere();
   149   }
   149   }
   239         SharkType::oop_type(),
   239         SharkType::oop_type(),
   240         "threadObj"),
   240         "threadObj"),
   241       true));
   241       true));
   242 }
   242 }
   243 
   243 
   244 void SharkIntrinsics::do_Unsafe_compareAndSwapInt() {
   244 void SharkIntrinsics::do_Unsafe_compareAndSetInt() {
   245   // Pop the arguments
   245   // Pop the arguments
   246   Value *x      = state()->pop()->jint_value();
   246   Value *x      = state()->pop()->jint_value();
   247   Value *e      = state()->pop()->jint_value();
   247   Value *e      = state()->pop()->jint_value();
   248   SharkValue *empty = state()->pop();
   248   SharkValue *empty = state()->pop();
   249   assert(empty == NULL, "should be");
   249   assert(empty == NULL, "should be");