Commit fada13be authored by George Hotz's avatar George Hotz

profile minigeth...no real hot spots

parent c9024c00
......@@ -73,7 +73,6 @@ contract MIPS {
return uint32(dat&mask | (isSigned ? signed : 0));
}
function handleSyscall(bytes32 stateHash) internal returns (bytes32) {
uint32 syscall_no = ReadMemory(stateHash, REG_OFFSET+2*4);
uint32 v0 = 0;
......@@ -215,7 +214,7 @@ contract MIPS {
if (opcode == 0 && func >= 8 && func < 0x1c) {
if (func == 8 || func == 9) {
// jr/jalr
return branchDelay(stateHash, nextPC, val | (func == 9 ? PC_FLAG : 0));
return branchDelay(stateHash, nextPC, rs | (func == 9 ? PC_FLAG : 0));
}
// handle movz and movn when they don't write back
......
......@@ -5,6 +5,7 @@ import (
"log"
"math/big"
"os"
"runtime/pprof"
"strconv"
"github.com/ethereum/go-ethereum/common"
......@@ -27,8 +28,14 @@ func check(err error) {
}
func main() {
// init secp256k1BytePoints
crypto.S256()
if len(os.Args) > 2 {
f, err := os.Create(os.Args[2])
if err != nil {
log.Fatal(err)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
}
// non mips
if len(os.Args) > 1 {
......@@ -43,6 +50,9 @@ func main() {
fmt.Println("commited transactions", hash, err)
}
// init secp256k1BytePoints
crypto.S256()
// read start block header
var parent types.Header
check(rlp.DecodeBytes(oracle.Preimage(oracle.Input(0)), &parent))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment