1461130868-f313e8bb-706b-45d6-b310-9b2d16f463fa

1. A computer program product for executing a modify runtime instrumentation controls (MRIC) instruction, the MRIC instruction executable in either a supervisor state or a lesser-privileged state, the MRIC instruction for setting only a subset of run-time-instrumentation controls, wherein all of said run-time-instrumentation controls are loadable by a privileged load run-time-instrumentation controls (LRIC) instruction, the computer program product comprising:
a non-transitory storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
fetching the MRIC instruction, the MRIC instruction including an address of a run-time-instrumentation control block (RICCB);
fetching, by a processor, the RICCB, the RICCB including a plurality of values for modifying said subset of run-time-instrumentation controls of the processor, the plurality of values of the RICCB comprising:
a runtime instrumentation program buffer current address (RCA) of a runtime instrumentation program buffer (RIB) location, the RIB for holding runtime instrumentation information of events recognized by the processor during program execution; and
one or more of:
a control to manage details of run-time-instrumentation data sampling;
a control to manage details of run-time-instrumentation data collection;
a control to manage details of run-time-instrumentation data reporting into a program buffer;
a control to manage detection of instruction-cache misses;
a control to manage detection of data-cache misses;
a control to manage a size of a reporting group;
a control to manage a current address within an output program buffer at which a next reporting group is stored;
controls to manage data collection of data on call-type, return-type, and transfer-type branches; and
controls to manage data collection of branches that are correctly or incorrectly predicted as taken or not taken;
loading the plurality of values into the run-time-instrumentation controls; and
using the loaded plurality of values to provide run-time-instrumentation event information to the RIB.
2. The computer program product according to claim 1, further comprising:
deriving a model dependent limited value for at least one of the plurality of values of the RICCB; and
loading the model dependent limited value as an updated value into the run-time-instrumentation controls.
3. The computer program product according to claim 2, wherein based on one of the plurality of values of the RICCB being the control to manage a size of a reporting group, the method further comprises:
loading the model dependent limited value;
based on a K field of the run-time-instrumentation controls having a first value, setting a current address to a value of an origin address of the RICCB; and
based on the K field of the run-time-instrumentation controls having a second value, setting the current address to a value of a specified RICCB current address value.
4. The computer program product according to claim 1, further comprising causing an exception, based on any one or more of:
determining that the address in the MRIC instruction does not align with a double word boundary; and
determining that the RICCB cannot be fetched from the address included in the MRIC instruction.
5. The computer program product according to claim 1, further comprising:
determining that one or more values in the RICCB are valid, wherein the determining further comprises any one of:
determining that a run-time-instrumentation S bit indicates that execution of the MRIC instruction from the lesser-privileged state is not permitted;
determining that the run-time-instrumentation controls are not valid; and
determining that run-time-instrumentation is not enabled.
6. The computer program product according to claim 1, wherein the MRIC instruction is defined for a first computer architecture, and the fetching and parsing is executed by a second processor of an alternate computer architecture, the fetching and parsing by the second processor comprising:
identifying a software routine for emulating execution of the MRIC instruction on the first computer architecture; and
executing the MRIC instruction with the software routine.
7. The computer program product according to claim 1, wherein no values in the run-time-instrumentation controls are updated if an error is encountered.
8. A computer system for executing a modifying run-time-instrumentation controls (MRIC) instruction from either a supervisor state or a lesser-privileged state, the MRIC instruction for setting only a subset of run-time-instrumentation controls, wherein all of said run-time-instrumentation controls are loadable by a privileged load run-time-instrumentation controls (LRIC) instruction comprising:
a computer processor comprising a run-time-instrumentation module, the run-time-instrumentation module configured to perform a method comprising:
fetching the MRIC instruction, the MRIC instruction including an address of a run-time-instrumentation control block (RICCB);
fetching the RICCB, the RICCB including a plurality of values for modifying said subset of run-time-instrumentation controls of the computer processor, the plurality of values of the RICCB comprising:
a runtime instrumentation program buffer current address (RCA) of a runtime instrumentation program buffer (RIB) location, the RIB for holding runtime instrumentation information of events recognized by the computer processor during program execution; and
one or more of:
a control to manage details of run-time-instrumentation data sampling;
a control to manage details of run-time-instrumentation data collection;
a control to manage details of run-time-instrumentation data reporting into a program buffer;
a control to manage detection of instruction-cache misses;
a control to manage detection of data-cache misses;
a control to manage a size of a reporting group;
a control to manage a current address within an output program buffer at which a next reporting group is stored;
controls to manage data collection of data on call-type, return-type, and transfer-type branches; and
controls to manage data collection of branches that are correctly or incorrectly predicted as taken or not taken;
loading the plurality of values into the run-time-instrumentation controls; and
using the loaded plurality of values to provide run-time-instrumentation event information to the RIB.
9. The system according to claim 8, further comprising:
deriving a model dependent limited value for at least one of the plurality of values of the RICCB; and
loading the model dependent limited value as an updated value into the run-time-instrumentation controls.
10. The system according to claim 9, wherein based on one of the plurality of values of the RICCB being the control to manage a size of a reporting group, the method further comprises:
loading the model dependent limited value;
based on a K field of the run-time-instrumentation controls having a first value, setting a current address to a value of an origin address of the RICCB; and
based on the K field of the run-time-instrumentation controls having a second value, setting the current address to a value of a specified RICCB current address value.
11. The system according to claim 8, further comprising causing an exception, based on any one or more of:
determining that the address in the MRIC instruction does not align with a double word boundary; and
determining that the RICCB cannot be fetched from the address included in the MRIC instruction.
12. The system according to claim 8, further comprising:
determining that one or more values in the RICCB are valid, wherein the determining further comprises any one of:
determining that a run-time-instrumentation S bit indicates that execution of the MRIC instruction from the lesser-privileged state is not permitted;
determining that the run-time-instrumentation controls are not valid; and
determining that run-time-instrumentation is not enabled.
13. The system according to claim 8, wherein the MRIC instruction is defined for a first computer architecture, and the fetching and parsing is executed by a second processor of an alternate computer architecture, the fetching and parsing by the second processor comprising:
identifying a software routine for emulating execution of the MRIC instruction on the first computer architecture; and
executing the MRIC instruction with the software routine.
14. The system according to claim 8, wherein no values in the run-time-instrumentation controls are updated if an error is encountered.

The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.

1. A foldable computer mouse comprising:
a mouse body having an upper surface and a bottom, the bottom having a receiving space and a contact surface;
a sensor disposed on the contact surface; and
an extension part pivotally connected to the mouse body, when the extension part rotating outwards to a predetermined position, the extension part extending the upper surface, and when the extension part rotating inwards into the receiving space, the upper surface being reduced,
wherein the sensor being exposed on the contact surface when the extension part is either disposed at one of the predetermined location and the receiving space.
2. The foldable computer mouse as claimed in claim 1, wherein the mouse body further comprises a hinge adjacent to the receiving space, and the extension part is pivotally connected to the mouse body by the hinge.
3. The foldable computer mouse as claimed in claim 1, wherein the bottom of the receiving space is a slope.
4. The foldable computer mouse as claimed in claim 1, the extension part further comprising a first side pivotally connected to the mouse body and a second side opposite to the first side, wherein when the extension part rotates outwards to the predetermined location, the second side and the bottom of the mouse body are at the same level.
5. The foldable computer mouse as claimed in claim 1, wherein the extension part is an ergonomic plate and the ergonomic plate is curved.
6. The foldable computer mouse as claimed in claim 5, wherein the bottom configuration of the receiving space substantially matches the shape of the ergonomic plate.
7. A foldable computer mouse for controlling the movement of the pointer comprising:
a mouse body with a receiving space and a sensor, wherein the receiving space is located on a bottom of the mouse body and the sensor is disposed on the bottom other than the receiving space;
a hinge located at one side of the mouse body; and
an extension part pivotally connected to the mouse body by the hinge, and the extension part and the mouse body can rotate relatively to the hinge in order to convert the form of the foldable computer mouse;
wherein when the extension part rotates to a predetermined location, the foldable computer mouse is in an extension form and the sensor is exposed, yet when the extension part is located inside the receiving space, the foldable computer mouse is in a compact form, and the sensor is also exposed.
8. The foldable computer mouse as claimed in claim 7, wherein the capacity of the receiving space is bigger than the volume of the extension part for embedding the extension part in the receiving space completely.
9. The foldable computer mouse as claimed in claim 8, wherein the depth of the receiving space turns from deep to shallow, and the hinge is located at the deepest spot of the receiving space.
10. The foldable computer mouse as claimed in claim 7, the extension part further comprising a first side pivotally connected to the mouse body by the hinge and a second side opposite to the first side, wherein when the extension part rotates outwards to the predetermined location, the second side and the bottom of the mouse body are at the same level.
11. The foldable computer mouse as claimed in claim 7, wherein the extension part is an ergonomic plate, and the ergonomic plate is curved.
12. The foldable computer mouse as claimed in claim 11, wherein the configuration of the receiving space matches the shape of the ergonomic plate substantially.
13. A computer mouse comprising:
a mouse body having an upper surface and a bottom, the bottom having a receiving space and a contact surface;
a sensor disposed on the contact surface, the sensor detecting the motion of the mouse body relatively to a plane when the mouse body is placed on the plane; and
an extension part pivotally connected to the mouse body, when the extension part rotating out from the receiving space, the extension part extending the upper surface and when the extension part rotating inwards into the receiving space, the sensor is kept exposed out from the bottom of the mouse body to detect the relative motion on the plane.
14. The mouse as claimed in claim 13, wherein when the extension part rotates outwards to the receiving space, an upper edge of the extension part connects to the top of the side wall close to the user of mouse body, and a lower edge of the extension part is in touch with the plane.
15. The mouse as claimed in claim 13, wherein the bottom of the receiving space is a slope extended from the top of the side wall close to the user to the sensor.
16. The mouse as claimed in claim 13, the bottom of the mouse body further comprising a finger insertion space which allows user’s finger insertion to lift the extension part, wherein the finger insertion space and the receiving space are communicated.
17. The mouse as claimed in claim 13, wherein the lower edge of the extension part is a pre-designed curve, and the receiving space substantially comprises the same pre-designed curve.
18. The mouse as claimed in claim 13, wherein the mouse further comprises an elastic element disposed between the upper edge of the extension part and the mouse body for providing elasticity to rotate the extension part towards the receiving space.