src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 47106 hotspot/src/os_cpu/linux_s390/vm/thread_linux_s390.hpp@bed18a111b90
child 49480 d7df2dd501ce
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     1
/*
47106
bed18a111b90 8173715: Remove FlatProfiler
gziemski
parents: 42065
diff changeset
     2
 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     3
 * Copyright (c) 2016 SAP SE. All rights reserved.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     5
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     8
 * published by the Free Software Foundation.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     9
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    14
 * accompanied this code).
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    15
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    19
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    22
 * questions.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    23
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    24
 */
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    25
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    26
#ifndef OS_CPU_LINUX_S390_VM_THREAD_LINUX_S390_HPP
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    27
#define OS_CPU_LINUX_S390_VM_THREAD_LINUX_S390_HPP
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    28
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    29
 private:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    30
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    31
  void pd_initialize() {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    32
    _anchor.clear();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    33
  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    34
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    35
  // The `last' frame is the youngest Java frame on the thread's stack.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    36
  frame pd_last_frame() {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    37
    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    38
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    39
    intptr_t* sp = last_Java_sp();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    40
    address pc = _anchor.last_Java_pc();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    41
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    42
    // Last_Java_pc ist not set if we come here from compiled code.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    43
    if (pc == NULL) {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    44
      pc = (address) *(sp + 14);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    45
    }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    46
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    47
    return frame(sp, pc);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    48
  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    49
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    50
 public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    51
  void set_base_of_stack_pointer(intptr_t* base_sp) {}
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    52
  intptr_t* base_of_stack_pointer() { return NULL; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    53
  void record_base_of_stack_pointer() {}
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    54
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    55
  // These routines are only used on cpu architectures that
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    56
  // have separate register stacks (Itanium).
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    57
  static bool register_stack_overflow() { return false; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    58
  static void enable_register_stack_guard() {}
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    59
  static void disable_register_stack_guard() {}
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    60
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    61
  bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    62
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    63
#endif // OS_CPU_LINUX_S390_VM_THREAD_LINUX_S390_HPP