├── .gitignore ├── Bench-bin ├── SearchGame ├── dhrystone ├── linpack ├── pi_css5 └── whetston ├── Linpack ├── linpack ├── linpack.c └── mk.sh ├── README.md ├── ReadMe.txt ├── dhrystone-src ├── dhry.h ├── dhry.res ├── dhry21a.c ├── dhry21b.c ├── dhrystone ├── mk.sh ├── timers.c └── tomake.txt ├── docs ├── ARM Cortex-A8 vs. Intel Atom.pdf └── lmbench-usenix.pdf ├── fhourstones ├── Connect4.hs ├── Connect4.java ├── Game.c ├── Game.java ├── GameTreeSearch.hs ├── LICENSE ├── Main.hs ├── Makefile ├── README.md ├── SearchGame ├── SearchGame.c ├── SearchGame.java ├── TransGame.c ├── TransGame.java ├── inputs └── nmake.mak ├── lmbench ├── ACKNOWLEDGEMENTS ├── CHANGES ├── COPYING ├── COPYING-2 ├── ChangeSet ├── Makefile ├── README ├── bin │ ├── arm-linux │ │ ├── bw_file_rd │ │ ├── bw_mem │ │ ├── bw_mmap_rd │ │ ├── bw_pipe │ │ ├── bw_tcp │ │ ├── bw_unix │ │ ├── cache │ │ ├── disk │ │ ├── enough │ │ ├── flushdisk │ │ ├── hello │ │ ├── lat_cmd │ │ ├── lat_connect │ │ ├── lat_ctx │ │ ├── lat_dram_page │ │ ├── lat_fcntl │ │ ├── lat_fifo │ │ ├── lat_fs │ │ ├── lat_fs_chown │ │ ├── lat_fs_create_unlink │ │ ├── lat_fs_open_close │ │ ├── lat_fs_write_truncate │ │ ├── lat_http │ │ ├── lat_mem_rd │ │ ├── lat_mmap │ │ ├── lat_ops │ │ ├── lat_pagefault │ │ ├── lat_pipe │ │ ├── lat_pmake │ │ ├── lat_proc │ │ ├── lat_rand │ │ ├── lat_rpc │ │ ├── lat_select │ │ ├── lat_sem │ │ ├── lat_sig │ │ ├── lat_syscall │ │ ├── lat_tcp │ │ ├── lat_udp │ │ ├── lat_unix │ │ ├── lat_unix_connect │ │ ├── lat_usleep │ │ ├── line │ │ ├── lmbench │ │ ├── lmdd │ │ ├── lmhttp │ │ ├── loop_o │ │ ├── memsize │ │ ├── mhz │ │ ├── msleep │ │ ├── par_mem │ │ ├── par_ops │ │ ├── stream │ │ ├── timing_o │ │ └── tlb │ └── i686-pc-linux-gnu │ │ ├── bw_file_rd │ │ ├── bw_mem │ │ ├── bw_mmap_rd │ │ ├── bw_pipe │ │ ├── bw_tcp │ │ ├── bw_unix │ │ ├── cache │ │ ├── disk │ │ ├── enough │ │ ├── flushdisk │ │ ├── hello │ │ ├── lat_cmd │ │ ├── lat_connect │ │ ├── lat_ctx │ │ ├── lat_dram_page │ │ ├── lat_fcntl │ │ ├── lat_fifo │ │ ├── lat_fs │ │ ├── lat_fs_chown │ │ ├── lat_fs_create_unlink │ │ ├── lat_fs_open_close │ │ ├── lat_fs_write_truncate │ │ ├── lat_http │ │ ├── lat_mem_rd │ │ ├── lat_mmap │ │ ├── lat_ops │ │ ├── lat_pagefault │ │ ├── lat_pipe │ │ ├── lat_pmake │ │ ├── lat_proc │ │ ├── lat_rand │ │ ├── lat_rpc │ │ ├── lat_select │ │ ├── lat_sem │ │ ├── lat_sig │ │ ├── lat_syscall │ │ ├── lat_tcp │ │ ├── lat_udp │ │ ├── lat_unix │ │ ├── lat_unix_connect │ │ ├── lat_usleep │ │ ├── line │ │ ├── lmbench │ │ ├── lmdd │ │ ├── lmhttp │ │ ├── loop_o │ │ ├── memsize │ │ ├── mhz │ │ ├── msleep │ │ ├── par_mem │ │ ├── par_ops │ │ ├── stream │ │ ├── timing_o │ │ └── tlb ├── doc │ ├── Makefile │ ├── bargraph.1 │ ├── benchmarks │ ├── bw_allmem.tbl │ ├── bw_file_rd.8 │ ├── bw_ipc.tbl │ ├── bw_mem.8 │ ├── bw_mem_rd.8 │ ├── bw_mmap_rd.8 │ ├── bw_pipe.8 │ ├── bw_reread2.tbl │ ├── bw_tcp.8 │ ├── bw_tcp.tbl │ ├── bw_unix.8 │ ├── cache.8 │ ├── ctx.pic │ ├── ctx.tbl │ ├── description.ms │ ├── graph.1 │ ├── lat_allmem.tbl │ ├── lat_allproc.tbl │ ├── lat_connect.8 │ ├── lat_connect.tbl │ ├── lat_ctx.8 │ ├── lat_disk.tbl │ ├── lat_fcntl.8 │ ├── lat_fifo.8 │ ├── lat_fs.8 │ ├── lat_fs.tbl │ ├── lat_http.8 │ ├── lat_ipc.tbl │ ├── lat_mem_rd.8 │ ├── lat_mmap.8 │ ├── lat_nullsys.tbl │ ├── lat_ops.8 │ ├── lat_pagefault.8 │ ├── lat_pipe.8 │ ├── lat_pipe.tbl │ ├── lat_proc.8 │ ├── lat_rpc.8 │ ├── lat_select.8 │ ├── lat_sig.8 │ ├── lat_signal.tbl │ ├── lat_syscall.8 │ ├── lat_tcp.8 │ ├── lat_tcp.tbl │ ├── lat_udp.8 │ ├── lat_udp.tbl │ ├── lat_unix.8 │ ├── lat_unix_connect.8 │ ├── line.8 │ ├── lmbench.3 │ ├── lmbench.8 │ ├── lmbench3.ms │ ├── lmbench3_arch.fig │ ├── lmbench3_signals.fig │ ├── lmdd.8 │ ├── mem.pic │ ├── memhier-color.d │ ├── memhier-line.d │ ├── memhier-tlb.d │ ├── memhier.ms │ ├── mhz.8 │ ├── par_mem.8 │ ├── par_ops.8 │ ├── parallel.ms │ ├── pgraph.1 │ ├── rccs.1 │ ├── refdbms.keys │ ├── references │ ├── references- │ ├── references-lmbench3 │ ├── references-memhier │ ├── references-parallel │ ├── references-userguide │ ├── references.private │ ├── reporting.3 │ ├── results.3 │ ├── stream.8 │ ├── timing.3 │ ├── tlb.8 │ ├── tmac.usenix │ ├── usenix.ol │ ├── usenix96.ms │ └── userguide.ms ├── hbench-REBUTTAL ├── quota-run-all.sh ├── results │ ├── Makefile │ ├── arm-result │ │ ├── LC-MP.0 │ │ ├── LC.0 │ │ ├── MOKUSEI.0 │ │ ├── NP11.0 │ │ ├── Paris.0 │ │ ├── Paris.1 │ │ └── SAKURA.0 │ ├── percent.errs │ └── summary.errs ├── scripts │ ├── Makefile │ ├── README │ ├── SHIT │ ├── TODO │ ├── allctx │ ├── allmem │ ├── bargraph │ ├── bghtml │ ├── build │ ├── compiler │ ├── config │ ├── config-run │ ├── config-scaling │ ├── depend │ ├── do_ctx │ ├── getbg │ ├── getbw │ ├── getctx │ ├── getdisk │ ├── getlist │ ├── getmax │ ├── getmem │ ├── getpercent │ ├── getresults │ ├── getsummary │ ├── gifs │ ├── gnu-os │ ├── graph │ ├── html-list │ ├── html-man │ ├── info │ ├── info-template │ ├── lmbench │ ├── make │ ├── man2html │ ├── mkrelease │ ├── new2oldctx │ ├── opercent │ ├── os │ ├── output │ ├── percent │ ├── rccs │ ├── results │ ├── save │ ├── stats │ ├── statsummary │ ├── synchronize │ ├── target │ ├── version │ └── xroff └── src │ ├── Makefile │ ├── TODO │ ├── bench.h │ ├── busy.c │ ├── bw_file_rd.c │ ├── bw_mem.c │ ├── bw_mmap_rd.c │ ├── bw_pipe.c │ ├── bw_tcp.c │ ├── bw_udp.c │ ├── bw_unix.c │ ├── cache.c │ ├── clock.c │ ├── disk.c │ ├── enough.c │ ├── flushdisk.c │ ├── getopt.c │ ├── hello.c │ ├── lat_cmd.c │ ├── lat_connect.c │ ├── lat_ctx.c │ ├── lat_dram_page.c │ ├── lat_fcntl.c │ ├── lat_fifo.c │ ├── lat_fs.c │ ├── lat_fs_chown.c │ ├── lat_fs_create_unlink.c │ ├── lat_fs_open_close.c │ ├── lat_fs_write_truncate.c │ ├── lat_http.c │ ├── lat_mem_rd.c │ ├── lat_mmap.c │ ├── lat_ops.c │ ├── lat_pagefault.c │ ├── lat_pipe.c │ ├── lat_pmake.c │ ├── lat_proc.c │ ├── lat_rand.c │ ├── lat_rpc.c │ ├── lat_select.c │ ├── lat_sem.c │ ├── lat_sig.c │ ├── lat_syscall.c │ ├── lat_tcp.c │ ├── lat_udp.c │ ├── lat_unix.c │ ├── lat_unix_connect.c │ ├── lat_usleep.c │ ├── lib_debug.c │ ├── lib_debug.h │ ├── lib_mem.c │ ├── lib_mem.h │ ├── lib_sched.c │ ├── lib_stats.c │ ├── lib_tcp.c │ ├── lib_tcp.h │ ├── lib_timing.c │ ├── lib_udp.c │ ├── lib_udp.h │ ├── lib_unix.c │ ├── lib_unix.h │ ├── line.c │ ├── lmdd.1 │ ├── lmdd.c │ ├── lmhttp.c │ ├── loop_o.c │ ├── memsize.c │ ├── mhz.c │ ├── msleep.c │ ├── names.h │ ├── par_mem.c │ ├── par_ops.c │ ├── rhttp.c │ ├── seek.c │ ├── stats.h │ ├── stream.c │ ├── timing.h │ ├── timing_o.c │ ├── tlb.c │ ├── version.h │ └── webpage-lm.tar ├── pi_css5_src ├── Makefile ├── fftsg_h.c ├── install.txt ├── pi_css5 ├── pi_fftcs.c └── readme.txt └── whetstone ├── mk.sh ├── whetston └── whetstone.c /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | 4 | # Libraries 5 | *.lib 6 | *.a 7 | 8 | # Shared objects (inc. Windows DLLs) 9 | *.dll 10 | *.so 11 | *.so.* 12 | *.dylib 13 | 14 | # Executables 15 | *.exe 16 | *.out 17 | *.app 18 | -------------------------------------------------------------------------------- /Bench-bin/SearchGame: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/Bench-bin/SearchGame -------------------------------------------------------------------------------- /Bench-bin/dhrystone: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/Bench-bin/dhrystone -------------------------------------------------------------------------------- /Bench-bin/linpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/Bench-bin/linpack -------------------------------------------------------------------------------- /Bench-bin/pi_css5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/Bench-bin/pi_css5 -------------------------------------------------------------------------------- /Bench-bin/whetston: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/Bench-bin/whetston -------------------------------------------------------------------------------- /Linpack/linpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/Linpack/linpack -------------------------------------------------------------------------------- /Linpack/mk.sh: -------------------------------------------------------------------------------- 1 | /home/hexiongjun/SmartAuto/prebuilt/toolchains/arm-fsl-linux-gnueabi/4.6.2/bin/arm-fsl-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon -o linpack linpack.c 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ARM_BenchMark 2 | ============= 3 | 4 | A copy from of ARM Benchmark tools souce code: lmbench dhrystone fhourstones Linpack whetstone. 5 | I have written [a summary article](http://tonyho.github.io/ARM%20Linux%20BenchMark.html) about the ARM benchmark. 6 | -------------------------------------------------------------------------------- /ReadMe.txt: -------------------------------------------------------------------------------- 1 | Integer--fhourstons 2 | dhrystone-src:integer 3 | -------------------------------------------------------------------------------- /dhrystone-src/dhry.res: -------------------------------------------------------------------------------- 1 | 2 | Dhrystone Benchmark, Version 2.1 (Language: C) 3 | Register option selected. 4 | Microseconds for one loop: 2.2 5 | Dhrystones per second: 454545.5 6 | VAX MIPS rating: 258.705 7 | 8 | Dhrystone Benchmark, Version 2.1 (Language: C) 9 | Register option selected. 10 | Microseconds for one loop: 2.1 11 | Dhrystones per second: 468823.3 12 | VAX MIPS rating: 266.832 13 | 14 | Dhrystone Benchmark, Version 2.1 (Language: C) 15 | Register option selected. 16 | Microseconds for one loop: 6.2 17 | Dhrystones per second: 162138.3 18 | VAX MIPS rating: 92.281 19 | 20 | Dhrystone Benchmark, Version 2.1 (Language: C) 21 | Register option selected. 22 | Microseconds for one loop: 6.2 23 | Dhrystones per second: 161698.0 24 | VAX MIPS rating: 92.031 25 | -------------------------------------------------------------------------------- /dhrystone-src/dhrystone: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/dhrystone-src/dhrystone -------------------------------------------------------------------------------- /dhrystone-src/mk.sh: -------------------------------------------------------------------------------- 1 | /home/hexiongjun/SmartAuto/prebuilt/toolchains/arm-fsl-linux-gnueabi/4.6.2/bin/arm-fsl-linux-gnueabi-gcc -O2 -o dhrystone dhry21a.c dhry21b.c timers.c 2 | -------------------------------------------------------------------------------- /dhrystone-src/tomake.txt: -------------------------------------------------------------------------------- 1 | gcc -O2 -o dhrystone dhry21a.c dhry21b.c timers.c -------------------------------------------------------------------------------- /docs/ARM Cortex-A8 vs. Intel Atom.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/docs/ARM Cortex-A8 vs. Intel Atom.pdf -------------------------------------------------------------------------------- /docs/lmbench-usenix.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/docs/lmbench-usenix.pdf -------------------------------------------------------------------------------- /fhourstones/Connect4.hs: -------------------------------------------------------------------------------- 1 | module Connect4 where 2 | 3 | import Data.Word 4 | import Data.Int 5 | import Data.Bits 6 | import Data.List 7 | import Data.Array.Unboxed 8 | 9 | (width,height) = (7,6) 10 | height' = height + 1 11 | height'' = height + 2 12 | size = width * height 13 | bsize = width * height' 14 | 15 | type BitBoard = Word64 -- bitmask corresponds to board as follows in 7x6 case: 16 | -- . . . . . . . TOP 17 | -- 5 12 19 26 33 40 47 18 | -- 4 11 18 25 32 39 46 19 | -- 3 10 17 24 31 38 45 20 | -- 2 9 16 23 30 37 44 21 | -- 1 8 15 22 29 36 43 22 | -- 0 7 14 21 28 35 42 BOTTOM 23 | 24 | type Heights = UArray Int Int -- index of lowest free square in each column 25 | 26 | data Game = Game !Int !BitBoard !BitBoard Heights 27 | 28 | bottom = (bit bsize - 1) `div` (bit height' - 1) -- mask for bottom squares 29 | -- equals 2^0 + 2^{height'} + 2^{2*height'} + .. + 2^{(width-1)*height'} 30 | -- which is a geometric series evaluating to the above fraction 31 | top = bottom `shiftL` height 32 | 33 | showbb white black = 34 | header++'\n':unlines (map showrow [height-1,height-2..0])++wininfo where 35 | header = ' ':unwords (map show [1..width]) 36 | showrow h = ' ':intersperse ' ' (map cell [h,h+height'..bsize-1]) 37 | cell i | testBit black i = '@' 38 | | testBit white i = 'O' 39 | | otherwise = '.' 40 | wininfo | isWon black = "@ won\n" 41 | | isWon white = "O won\n" 42 | | otherwise = "" 43 | 44 | instance Show Game where 45 | show (Game n tm ntm _) = if even n then showbb tm ntm else showbb ntm tm 46 | 47 | allmoves = [0..width-1] 48 | 49 | isLegal bb = (bb .&. top) == 0 50 | 51 | isLegalGame (Game _ _ ntm _) = isLegal ntm 52 | 53 | legalmoves g = filter (isLegalGame . snd . move g) allmoves 54 | 55 | isWon bb = any ((/= 0) . dir) [1,height,height',height''] where 56 | dir d = let t = bb .&. (bb `shiftR` d) in t .&. (t `shiftR` (2*d)) 57 | 58 | isWonGame (Game _ _ ntm _) = isWon ntm 59 | 60 | isLegalWon bb = isLegal bb && isWon bb 61 | isLegalWonGame (Game _ _ ntm _) = isLegalWon ntm 62 | 63 | move (Game n tm ntm hs) i = (h,g) where 64 | h = hs!i 65 | g = Game (n+1) ntm (setBit tm h) (hs//[(i,h+1)]) 66 | 67 | encode :: Game -> Word64 68 | encode (Game n tm ntm _) = 69 | if n >= symmrec then key else min key (revcols 0 key) where 70 | symmrec = 10 -- symmetry normalize first SYMMREC moves 71 | key = 2*tm + ntm + bottom 72 | revcols 0 a = a 73 | revcols k a = revcols (shiftR k height') (shiftL a height' .|. k.&.col1) 74 | col1 = bit height' - 1 75 | 76 | isWinnable (Game _ tm _ hs) = any (isLegalWon . setBit tm) (elems hs) 77 | 78 | goodMoves g@(Game _ _ ntm hs) = 79 | let noThreatAbove h = not $ isLegalWon $ setBit ntm $ h+1 in 80 | case filter (isLegalWon . setBit ntm) (elems hs) of -- forced moves 81 | [] -> [hig | i <- allmoves, let hig@(hi,(Game _ _ ntmi _)) = move g i, 82 | isLegal ntmi && noThreatAbove hi ] 83 | [hf] | noThreatAbove hf -> [move g (hf `div` height')] 84 | _ -> [] -- no good moves if multiple forced 85 | 86 | newGame = Game 0 0 0 $ listArray (0,width-1) [0,height'..] 87 | 88 | listGame = foldl (\i->snd.(move i)) newGame 89 | 90 | quads = [quad | i <- [0..bsize-1], dir <- [1,height,height',height''], 91 | let max = i + 3*dir, let quad = [i,i+dir..max], 92 | max < bsize && all (not . testBit top) quad] 93 | 94 | cntElems b a = accumArray (+) 0 b $ a `zip` (repeat 1) :: Array Int Int 95 | 96 | moveEval = cntElems (0,bsize-1) $ concat quads 97 | -------------------------------------------------------------------------------- /fhourstones/LICENSE: -------------------------------------------------------------------------------- 1 | // This software is copyright (c) 1996-2013 by 2 | // John Tromp 3 | // 600 Route 25A 4 | // East Setauket 5 | // NY 11733 6 | // E-mail: john.tromp@gmail.com 7 | // 8 | // This notice must not be removed. 9 | // This software must not be sold for profit. 10 | // You may redistribute if your distributees have the 11 | // same rights and restrictions. 12 | -------------------------------------------------------------------------------- /fhourstones/Main.hs: -------------------------------------------------------------------------------- 1 | -- This software is copyright (c) 1996-2005 by 2 | -- John Tromp 3 | -- Insulindeweg 908 4 | -- 1095 DX Amsterdam 5 | -- Netherlands 6 | -- E-mail: tromp@cwi.nl 7 | -- 8 | -- This notice must not be removed. 9 | -- This software must not be sold for profit. 10 | -- You may redistribute if your distributees have the 11 | -- same rights and restrictions. 12 | 13 | module Main where 14 | 15 | import Data.Bits 16 | import Data.Char 17 | import Data.Word 18 | import Data.Array.MArray 19 | import Data.Array.IO 20 | import Data.IORef 21 | import Numeric 22 | import CPUTime 23 | import IO 24 | 25 | import Connect4(width,height,Game(Game),listGame,isWonGame,isWinnable,goodMoves,size,bsize,moveEval,encode) 26 | import GameTreeSearch(Hash(Hash),GameTree(GTLoss,GTDraw,GTBranch),alphabeta,loss,losswin,win,newTT,TTable,statsTT,intlog,getPosed,ratio,locksize) 27 | 28 | ttsize = 8306069 -- should be at least 2^bsize-locksize 29 | 30 | makeGameTree game@(Game n _ _ _) h0 h1 = 31 | if n==size-1 then GTDraw else -- assume last move doesn't win 32 | if null children then GTLoss else 33 | if n==size-2 then GTDraw -- two moves left without opponent win is a draw 34 | else GTBranch (Hash lock hash) h0 children where 35 | key = encode game 36 | lock = fromIntegral (key `shiftR` (bsize - locksize)) 37 | hash = fromIntegral (key `mod` (fromIntegral ttsize)) 38 | children = [(h,makeGameTree g h1 h0) | (h,g) <- goodMoves game] 39 | 40 | solve line = do 41 | let moves = map ((\i->i-1).digitToInt) $ filter isDigit line 42 | let game@(Game n _ _ _) = listGame moves 43 | if (isWonGame game) then putStrLn "already lost" else 44 | if isWinnable game then putStrLn "instant win" else do 45 | tt <- newTT ttsize :: IO TTable 46 | hist0 <- thaw moveEval :: IO (IOUArray Int Int) 47 | hist1 <- thaw moveEval :: IO (IOUArray Int Int) 48 | putStrLn$("\nSolving "++).shows n.(("-ply position after "++line)++)$" . . ." 49 | nodes <- newIORef 0 :: IO (IORef Word64) 50 | tstart <- getCPUTime 51 | score <- alphabeta nodes tt losswin (makeGameTree game hist0 hist1) 52 | tend <- getCPUTime 53 | posed <- getPosed tt 54 | n <- readIORef nodes 55 | putStrLn $ ("score = "++).shows score.(" ("++).(("-<=>+"!!(score-loss)):). 56 | (") work = "++) $ show $ intlog posed 57 | let msecs = (tend-tstart) `div` 1000000000 58 | putStrLn $ shows n . (" pos / "++) . shows msecs . 59 | (" msec = "++) . showFFloat (Just 1) (ratio n msecs) $ " Kpos/sec" 60 | stats <- statsTT tt 61 | putStrLn stats 62 | 63 | main = do 64 | putStrLn $ ("Fhourstones 3.1 (Haskell)\nBoardsize = "++) . 65 | shows width . ('x':) . shows height . ("\nUsing "++) . 66 | shows ttsize $ " transposition table entries." 67 | input <- getContents 68 | mapM_ solve $ lines input 69 | -------------------------------------------------------------------------------- /fhourstones/Makefile: -------------------------------------------------------------------------------- 1 | # GNU Makefile 2 | 3 | CC = /home/hexiongjun/SmartAuto/prebuilt/toolchains/arm-fsl-linux-gnueabi/4.6.2/bin/arm-fsl-linux-gnueabi-gcc 4 | CFLAGS = -O3 -Wextra -Wall 5 | CFILES = SearchGame.c TransGame.c Game.c 6 | JAVAFILES = SearchGame.java Connect4.java Game.java TransGame.java 7 | HASKELLFILES = Main.hs Connect4.hs GameTreeSearch.hs 8 | FILES = Makefile inputs $(CFILES) $(JAVAFILES) $(HASKELLFILES) 9 | 10 | .PHONY : all exe run java haskell clean 11 | 12 | all : SearchGame 13 | 14 | clean : ; rm -f SearchGame SearchGame.ghc *.class *.o *.hi *.tar.gz *.zip 15 | 16 | run : SearchGame inputs 17 | ./SearchGame < inputs 18 | 19 | SearchGame : $(CFILES) 20 | $(CC) $(CFLAGS) -o $@ $< 21 | 22 | java : SearchGame.class 23 | SearchGame.class : $(JAVAFILES) 24 | javac -O $< 25 | # to run, 'java SearchGame < inputs' 26 | 27 | haskell : SearchGame.ghc 28 | SearchGame.ghc : $(HASKELLFILES) 29 | ghc -o SearchGame.ghc -O --make $< 30 | # to run, './SearchGame.ghc < inputs' 31 | 32 | tar: $(FILES) 33 | tar -cf Fhourstones.tar $(FILES) 34 | gzip Fhourstones.tar 35 | zip -r Fhourstones.zip $(FILES) 36 | -------------------------------------------------------------------------------- /fhourstones/README.md: -------------------------------------------------------------------------------- 1 | The Fhourstones benchmark 2 | ========================= 3 | 4 | This is the GitHub home of the Fhourstones benchmark by John Tromp. 5 | 6 | Homepage: http://homepages.cwi.nl/~tromp/c4/fhour.html 7 | 8 | -------------------------------------------------------------------------------- /fhourstones/SearchGame: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/fhourstones/SearchGame -------------------------------------------------------------------------------- /fhourstones/inputs: -------------------------------------------------------------------------------- 1 | 45461667 2 | 35333571 3 | 13333111 4 | 5 | -------------------------------------------------------------------------------- /fhourstones/nmake.mak: -------------------------------------------------------------------------------- 1 | # NMAKE Makefile for Microsoft Windows 2 | 3 | # To build: 4 | # nmake -f nmake.mak 5 | 6 | # FIXME: dependencies aren't fully described here, 7 | # as SearchGame.c includes TransGame.c, which includes Game.c 8 | # This should be fixed in the Unix makefile as well, 9 | # but that currently avoids the problem by compiling all C, every time. 10 | 11 | CFLAGS = /O2 12 | 13 | all : SearchGame.exe 14 | 15 | clean : ; del SearchGame.exe *.obj 16 | 17 | run : SearchGame.exe inputs 18 | SearchGame < inputs 19 | -------------------------------------------------------------------------------- /lmbench/ACKNOWLEDGEMENTS: -------------------------------------------------------------------------------- 1 | LMbench was originally developed by Larry McVoy while he worked 2 | at Sun Microsystems. Larry continued development while working 3 | at Silicon Graphics, and was joined by Carl Staelin, who works 4 | for Hewlett-Packard Laboratories. 5 | 6 | LMbench would not be the successful cross-platform benchmark 7 | that it is today without the efforts and assistance of a wide 8 | range of people. From volunteers who run it on various hardware 9 | and report bugs, to managers who provide financial and other 10 | support, to peers and colleagues who request features or 11 | provide feedback on design elements. All such help has been 12 | critical to making LMbench a success. 13 | 14 | Below is a partial list of all those people who helped support 15 | the development of LMbench in one form or other, such as 16 | benchmark suggestions, bug reports, and so forth. All omissions 17 | are accidental, and if your name was not included, please accept 18 | our humble apologies. 19 | 20 | The people who have helped LMbench include, in alphabetic 21 | order: 22 | 23 | Ralf Baechle, 24 | Christian Bau, 25 | Nelson H. F. Beebe, 26 | Anton Blanchard, 27 | Joel Berman, 28 | Paul Borrill, 29 | Ed Bradford, 30 | Len Brown, 31 | Robert G. Brown, 32 | Bruce Chapman, 33 | Tim Chen, 34 | Mark Culotta, 35 | Fred Douglis, 36 | Lars-Eke Eriksson, 37 | Josh Fisher, 38 | Marc Fleischmann, 39 | John Fort, 40 | Andy Glew, 41 | Achim Gratz, 42 | Richard Henderson, 43 | Rick Jones, 44 | Lev Iserovich, 45 | Michael A. Julier, 46 | Frans Kaashoek, 47 | Brad Knowles, 48 | Richard Littin, 49 | Bil Long, 50 | Udi Manber, 51 | John Mashey, 52 | David Miller, 53 | Dejan Milojicic, 54 | Ingo Molnar, 55 | David Mosberger, 56 | Will Newton, 57 | Satya Nishtala, 58 | Kevin Normoyle, 59 | Neal Nuckolls, 60 | Steve Piatz, 61 | Tim Prince, 62 | James Riden, 63 | Sam Roberts, 64 | Philip Roth, 65 | Chris Ruemmler, 66 | Olli Savia, 67 | Scott Schwartz, 68 | Wayne Scott, 69 | David Singleton, 70 | Mike Slifcak, 71 | Stephan Somogyi, 72 | Ratnakar Tiwari, 73 | Linus Torvalds, 74 | Dan Truong, 75 | Dirk Twiehaus, 76 | Duc Vianney, 77 | Ramya Vijay, 78 | Hai Vo-Ba, 79 | David T. Wang, 80 | Brian Whitney, 81 | David Wilson, 82 | Mitch Wright. 83 | 84 | -------------------------------------------------------------------------------- /lmbench/ChangeSet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/ChangeSet -------------------------------------------------------------------------------- /lmbench/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for top level of lmbench 2 | # $Id$ 3 | 4 | # Possible things to $(MAKE): 5 | # 6 | # build (default) go to the source directory and build the benchmark 7 | # results go to the source directory and build and run the benchmark 8 | # rerun run the benchmark again 9 | # see see the results that came with this release 10 | # Go to the results directory and read the Makefile. 11 | # doc.lpr print the documentation 12 | # doc.x preview the documentation (needs X, groff, pic, etc) 13 | # clean go to the subdirs and $(MAKE) clean 14 | # get $(MAKE) sure all files are checked out 15 | # shar build a shippable shar archive 16 | 17 | SHELL=/bin/sh 18 | 19 | build: 20 | cd src && $(MAKE) 21 | 22 | results: FRC 23 | cd src && $(MAKE) results 24 | 25 | rerun: 26 | cd src && $(MAKE) rerun 27 | 28 | see: 29 | cd results && $(MAKE) summary >summary.out 2>summary.errs 30 | cd results && $(MAKE) percent >percent.out 2>percent.errs 31 | 32 | doc.lpr: 33 | cd doc && $(MAKE) PS && lpr *.PS 34 | 35 | doc.x: 36 | cd doc && $(MAKE) x 37 | 38 | clobber clean: 39 | for i in doc src results scripts; do \ 40 | echo ===== $$i =====; \ 41 | (cd $$i && $(MAKE) clean); \ 42 | done 43 | /bin/rm -rf bin/* 44 | -bk clean 45 | 46 | get: 47 | for i in doc src results scripts; do \ 48 | echo ===== $$i =====; \ 49 | (cd $$i && bk get -q); \ 50 | done 51 | @co -q 52 | 53 | info: 54 | for i in doc src results scripts; do \ 55 | echo ===== $$i =====; \ 56 | (cd $$i && info); \ 57 | done 58 | 59 | release: scripts/mkrelease 60 | scripts/mkrelease 61 | 62 | scripts/mkrelease: 63 | cd scripts && co mkrelease 64 | 65 | # XXX - . must be named lmbench for this to work 66 | shar: 67 | $(MAKE) clean 68 | co -q Makefile 69 | $(MAKE) get 70 | cd .. && \ 71 | find lmbench -type f -print | egrep -v 'noship|RCS' > /tmp/FILES 72 | cd .. && shar -S -a -n lmbench1.0 -L 50K < /tmp/FILES 73 | 74 | FRC: 75 | -------------------------------------------------------------------------------- /lmbench/README: -------------------------------------------------------------------------------- 1 | LMBench + quota tests 2 | 3 | To run the quota benchmarks, you should be able to say: 4 | 5 | mkdir /tmp/{img,mnt} 6 | ./quota-run-all.sh 7 | 8 | To run the benchmark, you should be able to say: 9 | 10 | cd src 11 | make results 12 | 13 | If you want to see how you did compared to the other system results 14 | included here, say 15 | 16 | make see 17 | 18 | Be warned that many of these benchmarks are sensitive to other things 19 | being run on the system, mainly from CPU cache and CPU cycle effects. 20 | So make sure your screen saver is not running, etc. 21 | 22 | It's a good idea to do several runs and compare the output like so 23 | 24 | make results 25 | make rerun 26 | make rerun 27 | make rerun 28 | cd Results && make LIST=/* 29 | -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/bw_file_rd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/bw_file_rd -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/bw_mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/bw_mem -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/bw_mmap_rd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/bw_mmap_rd -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/bw_pipe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/bw_pipe -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/bw_tcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/bw_tcp -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/bw_unix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/bw_unix -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/cache -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/disk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/disk -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/enough: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/enough -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/flushdisk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/flushdisk -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/hello -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_cmd -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_connect: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_connect -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_ctx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_ctx -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_dram_page: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_dram_page -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_fcntl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_fcntl -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_fifo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_fifo -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_fs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_fs -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_fs_chown: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_fs_chown -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_fs_create_unlink: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_fs_create_unlink -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_fs_open_close: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_fs_open_close -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_fs_write_truncate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_fs_write_truncate -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_http: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_http -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_mem_rd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_mem_rd -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_mmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_mmap -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_ops: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_ops -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_pagefault: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_pagefault -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_pipe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_pipe -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_pmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_pmake -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_proc -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_rand: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_rand -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_rpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_rpc -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_select: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_select -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_sem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_sem -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_sig -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_syscall: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_syscall -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_tcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_tcp -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_udp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_udp -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_unix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_unix -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_unix_connect: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_unix_connect -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lat_usleep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lat_usleep -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/line: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/line -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lmdd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lmdd -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/lmhttp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/lmhttp -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/loop_o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/loop_o -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/memsize: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/memsize -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/mhz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/mhz -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/msleep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/msleep -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/par_mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/par_mem -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/par_ops: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/par_ops -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/stream: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/stream -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/timing_o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/timing_o -------------------------------------------------------------------------------- /lmbench/bin/arm-linux/tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/arm-linux/tlb -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/bw_file_rd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/bw_file_rd -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/bw_mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/bw_mem -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/bw_mmap_rd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/bw_mmap_rd -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/bw_pipe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/bw_pipe -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/bw_tcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/bw_tcp -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/bw_unix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/bw_unix -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/cache -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/disk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/disk -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/enough: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/enough -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/flushdisk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/flushdisk -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/hello -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_cmd -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_connect: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_connect -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_ctx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_ctx -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_dram_page: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_dram_page -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_fcntl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_fcntl -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_fifo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_fifo -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_fs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_fs -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_fs_chown: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_fs_chown -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_fs_create_unlink: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_fs_create_unlink -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_fs_open_close: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_fs_open_close -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_fs_write_truncate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_fs_write_truncate -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_http: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_http -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_mem_rd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_mem_rd -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_mmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_mmap -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_ops: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_ops -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_pagefault: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_pagefault -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_pipe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_pipe -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_pmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_pmake -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_proc -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_rand: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_rand -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_rpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_rpc -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_select: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_select -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_sem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_sem -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_sig -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_syscall: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_syscall -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_tcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_tcp -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_udp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_udp -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_unix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_unix -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_unix_connect: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_unix_connect -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lat_usleep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lat_usleep -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/line: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/line -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lmdd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lmdd -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/lmhttp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/lmhttp -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/loop_o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/loop_o -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/memsize: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/memsize -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/mhz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/mhz -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/msleep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/msleep -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/par_mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/par_mem -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/par_ops: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/par_ops -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/stream: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/stream -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/timing_o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/timing_o -------------------------------------------------------------------------------- /lmbench/bin/i686-pc-linux-gnu/tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/bin/i686-pc-linux-gnu/tlb -------------------------------------------------------------------------------- /lmbench/doc/benchmarks: -------------------------------------------------------------------------------- 1 | Theme 2 | Data movement and the cost thereof 3 | Latency 4 | Time per operation 5 | CPU cycles per operation 6 | Bandwidth 7 | MB / sec 8 | CPU cycles / MB 9 | Media 10 | Memory (load, bcopy) 11 | Disk (randoms, sequentials) 12 | File system (directory ops, sequential) 13 | Network (hot potato, transfer) 14 | Pipes (hot potato, transfer) 15 | VM system (mmaps/munmaps, bcopy) 16 | Systems 17 | All Unix systems 18 | Windows NT 19 | VMS (?) 20 | Mainframes (?) 21 | Memory 22 | Small transfers (randoms) 23 | Load latency 24 | Large transfers (sequential) 25 | Bcopy bandwidth 26 | Processes 27 | Null process execution time 28 | Context switching 29 | Misc 30 | Null entry into the system 31 | Networking 32 | Small transfers (randoms) 33 | Transfers per second 34 | CPU cycles per transfer 35 | socket/bind/close per second 36 | Large transfers (sequential) 37 | MB per second 38 | CPU cycles per MB 39 | Disks 40 | Small transfers (randoms) 41 | Transfers per second 42 | CPU cycles per transfer 43 | Large transfers (sequential) 44 | MB per second 45 | CPU cycles per MB 46 | File system 47 | Small transfers (randoms) 48 | Creates / second 49 | Removes / second 50 | Random I/O's per second in large file 51 | CPU cycles per transfer 52 | MB / sec when reading many related small files 53 | Large files 54 | MB / second read/write 55 | CPU cycles per MB 56 | Hardness 57 | Measure fsck time? 58 | Virtual memory system 59 | Creation 60 | mmaps per second 61 | munmaps per second 62 | Also vary size of mapped region 63 | Small transfers (randoms) 64 | Random reads per second of large mmaped file 65 | CPU cycles per read 66 | Large transfers (cached sequential) 67 | MB per second read rate 68 | CPU cycles per MB 69 | -------------------------------------------------------------------------------- /lmbench/doc/bw_allmem.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | c|c s|c s 5 | l|c c|c c 6 | l|r r|r r. 7 | Bcopy Memory 8 | System \fBunrolled\fP libc read write 9 | = 10 | DEC Alpha 41 39 76 78\ 11 | DEC Alpha 46 46 88 91\ 12 | DEC Alpha 46 45 79 91\ 13 | DEC Alpha 38 40 69 84\ 14 | SunOS-5.4 sun4d 22 21 47 38\ 15 | DEC Alpha 36 36 55 72\ 16 | DEC Alpha 38 38 64 79\ 17 | SunOS-5.4 sun4m 25 23 64 51\ 18 | SunOS-5.4 sun4m 24 23 59 40\ 19 | SunOS-5.4 sun4d 16 14 36 28\ 20 | SunOS-5.4 sun4m 31 26 80 62\ 21 | Sun SC1000 17 15 38 31\ 22 | Sun Ultra1 85 167 129 152\ 23 | Linux alpha 40 40 74 72\ 24 | Linux i686 42 57 205 56\ 25 | Linux i586 30 31 61 50\ 26 | Linux alpha 39 39 73 71\ 27 | Unixware/i686 65 55 214 86\ 28 | Linux i586 38 42 74 75\ 29 | IBM Power2 242 171 205 364\ 30 | IBM PowerPC 21 21 63 26\ 31 | dgux mc88110 17 17 37 19\ 32 | DEC Alpha 15 15 46 20\ 33 | IRIX64 IP21 68 70 92 90\ 34 | IRIX64-601 IP26 41 32 65 61\ 35 | Linux i586 38 41 74 75\ 36 | Linux i586 20 21 60 31\ 37 | Linux i586 20 21 58 30\ 38 | Linux i586 20 21 60 31\ 39 | Linux i486 16 17 33 41\ 40 | HP-UX 9000/819 55 48 97 89\ 41 | FreeBSD/i586 39 42 73 83\ 42 | FreeBSD/i586 38 41 65 83\ 43 | FreeBSD/i586 38 41 65 83\ 44 | HP-UX 9000/735 32 26 55 52\ 45 | HP-UX 9000/735 32 26 54 51\ 46 | FreeBSD/i586 36 40 62 83\ 47 | IRIX64 IP25 53 41 87 72\ 48 | IRIX64 IP19 32 34 65 67\ 49 | HP-UX 9000/735 31 26 53 51\ 50 | HP-UX 9000/735 32 26 53 51\ 51 | HP-UX 9000/755 31 25 49 52\ 52 | HP-UX 9000/770 31 33 56 61\ 53 | HP-UX 9000/897 19 19 40 37\ 54 | IRIX64 IP19 35 36 65 67\ 55 | IRIX IP19 33 34 67 72\ 56 | IRIX5.3 IP19 32 34 65 68\ 57 | IRIX IP22 32 33 68 72\ 58 | IRIX5.3 IP22 31 32 69 66\ 59 | FreeBSD/i586 39 42 65 83\ 60 | .TE 61 | .KE 62 | -------------------------------------------------------------------------------- /lmbench/doc/bw_file_rd.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BW_FILE_RD 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | bw_file_rd \- time the reading and summing of a file 5 | .SH SYNOPSIS 6 | .B bw_file_rd 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I size 17 | .I file 18 | .SH DESCRIPTION 19 | .B bw_file_rd 20 | times the read of the specified file in 64KB blocks. Each block is summed 21 | up as a seried of 4 byte integers in an unrolled loop. 22 | Results are reported in megabytes read per second. 23 | .LP 24 | The data is not accessed in the user program; the benchmark relies on 25 | the operating systems read interface to have actually moved the data. 26 | Systems that implement page flipping may fool this benchmark. 27 | .LP 28 | The benchmark is intended to be used on a file 29 | that is in memory, i.e., the benchmark is a reread benchmark. Other 30 | file benchmarking can be done with 31 | .BR lmdd (8). 32 | .LP 33 | The size 34 | specification may end with ``k'' or ``m'' to mean 35 | kilobytes (* 1024) or megabytes (* 1024 * 1024). 36 | .SH OUTPUT 37 | Output format is \f(CB"%0.2f %.2f\\n", megabytes, megabytes_per_second\fP, i.e., 38 | .sp 39 | .ft CB 40 | 8.00 25.33 41 | .ft 42 | .SH MEMORY UTILIZATION 43 | This benchmark can move up to three times the requested memory. Most Unix 44 | systems implement the read system call as a bcopy from kernel space 45 | to user space. Bcopy will use 2-3 times as much memory bandwidth: 46 | there is one read from the source and a write to the destionation. The 47 | write usually results in a cache line read and then a write back of 48 | the cache line at some later point. Memory utilization might be reduced 49 | by 1/3 if the processor architecture implemented ``load cache line'' 50 | and ``store cache line'' instructions (as well as ``getcachelinesize''). 51 | .SH ACKNOWLEDGEMENT 52 | Funding for the development of 53 | this tool was provided by Sun Microsystems Computer Corporation. 54 | .SH "SEE ALSO" 55 | lmbench(8). 56 | .SH "AUTHOR" 57 | Carl Staelin and Larry McVoy 58 | .PP 59 | Comments, suggestions, and bug reports are always welcome. 60 | -------------------------------------------------------------------------------- /lmbench/doc/bw_ipc.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l c c c 5 | l r r r. 6 | System bcopy \fBpipe\fP TCP 7 | = 8 | DEC Alpha 36 32 9\ 9 | DEC Alpha 46 54 11\ 10 | DEC Alpha 38 23 7\ 11 | DEC Alpha 45 35 9\ 12 | DEC Alpha 39 32 12\ 13 | Linux alpha 39 73 9\ 14 | Sun Ultra1 167 61 51\ 15 | SunOS-5.4 sun4m 26 11 11\ 16 | SunOS-5.4 sun4m 23 24 19\ 17 | DEC Alpha 40 24 6\ 18 | DEC Alpha 15 17 4\ 19 | Linux alpha 40 73 9\ 20 | Linux i586 42 34 7\ 21 | Linux i486 17 16 6\ 22 | Linux i586 31 24 3\ 23 | IBM Power2 171 84 10\ 24 | IBM PowerPC 21 30 17\ 25 | SunOS-5.4 sun4d 14 7 8\ 26 | HP-UX 9000/735 26 37 24\ 27 | SunOS-5.4 sun4m 23 7 9\ 28 | Linux i686 57 73 15\ 29 | Linux i586 41 22 5\ 30 | Linux i586 21 19 3\ 31 | Linux i586 21 18 3\ 32 | Linux i586 21 12 3\ 33 | Sun SC1000 15 9 11\ 34 | SunOS-5.4 sun4d 21 8 9\ 35 | IRIX5.3 IP22 32 34 22\ 36 | IRIX64-601 IP26 32 37 22\ 37 | HP-UX 9000/770 33 53 21\ 38 | HP-UX 9000/819 48 37 28\ 39 | HP-UX 9000/755 25 38 35\ 40 | IRIX IP22 33 32 7\ 41 | IRIX64 IP21 70 28 19\ 42 | HP-UX 9000/735 26 44 20\ 43 | HP-UX 9000/735 26 42 18\ 44 | HP-UX 9000/735 26 39 19\ 45 | IRIX64 IP25 41 40 26\ 46 | IRIX64 IP19 34 27 19\ 47 | IRIX64 IP19 36 17 31\ 48 | IRIX IP19 34 14 16\ 49 | IRIX5.3 IP19 34 12 12\ 50 | HP-UX 9000/897 19 26 17\ 51 | dgux mc88110 17 8 5\ 52 | .TE 53 | .KE 54 | -------------------------------------------------------------------------------- /lmbench/doc/bw_mem.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BW_MEM 8 "$Date$" "(c)1994-2000 Larry McVoy and Carl Staelin" "LMBENCH" 3 | .SH NAME 4 | bw_mem \- time memory bandwidth 5 | .SH SYNOPSIS 6 | .B bw_mem_cp 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I size 17 | .I rd|wr|rdwr|cp|fwr|frd|bzero|bcopy 18 | .I [align] 19 | .SH DESCRIPTION 20 | .B bw_mem 21 | allocates twice the specified amount of memory, zeros it, and then times 22 | the copying of the first half to the second half. Results are reported 23 | in megabytes moved per second. 24 | .LP 25 | The size 26 | specification may end with ``k'' or ``m'' to mean 27 | kilobytes (* 1024) or megabytes (* 1024 * 1024). 28 | .SH OUTPUT 29 | Output format is \f(CB"%0.2f %.2f\\n", megabytes, megabytes_per_second\fP, i.e., 30 | .sp 31 | .ft CB 32 | 8.00 25.33 33 | .ft 34 | .LP 35 | There are nine different memory benchmarks in 36 | .BR bw_mem . 37 | They each measure slightly different methods for reading, writing or 38 | copying data. 39 | .TP 40 | .B "rd" 41 | measures the time to read data into the processor. It computes the 42 | sum of an array of integer values. It accesses every fourth word. 43 | .TP 44 | .B "wr" 45 | measures the time to write data to memory. It assigns a constant 46 | value to each memory of an array of integer values. 47 | It accesses every fourth word. 48 | .TP 49 | .B "rdwr" 50 | measures the time to read data into memory and then write data to 51 | the same memory location. For each element in an array it adds 52 | the current value to a running sum before assigning a new (constant) 53 | value to the element. 54 | It accesses every fourth word. 55 | .TP 56 | .B "cp" 57 | measures the time to copy data from one location to another. It 58 | does an array copy: dest[i] = source[i]. 59 | It accesses every fourth word. 60 | .TP 61 | .B "frd" 62 | measures the time to read data into the processor. It computes the 63 | sum of an array of integer values. 64 | .TP 65 | .B "fwr" 66 | measures the time to write data to memory. It assigns a constant 67 | value to each memory of an array of integer values. 68 | .TP 69 | .B "fcp" 70 | measures the time to copy data from one location to another. It 71 | does an array copy: dest[i] = source[i]. 72 | .TP 73 | .B "bzero" 74 | measures how fast the system can 75 | .I bzero 76 | memory. 77 | .TP 78 | .B "bcopy" 79 | measures how fast the system can 80 | .I bcopy 81 | data. 82 | .SH MEMORY UTILIZATION 83 | This benchmark can move up to three times the requested memory. 84 | Bcopy will use 2-3 times as much memory bandwidth: 85 | there is one read from the source and a write to the destionation. The 86 | write usually results in a cache line read and then a write back of 87 | the cache line at some later point. Memory utilization might be reduced 88 | by 1/3 if the processor architecture implemented ``load cache line'' 89 | and ``store cache line'' instructions (as well as ``getcachelinesize''). 90 | .SH "SEE ALSO" 91 | lmbench(8). 92 | .SH "AUTHOR" 93 | Carl Staelin and Larry McVoy 94 | .PP 95 | Comments, suggestions, and bug reports are always welcome. 96 | -------------------------------------------------------------------------------- /lmbench/doc/bw_mem_rd.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BW_MEM_RD 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | bw_mem_rd \- time memory read rate (with overhead) 5 | .SH SYNOPSIS 6 | .B bw_mem_rd 7 | .I size 8 | .SH DESCRIPTION 9 | .B bw_mem_rd 10 | allocates the specified amount of memory, zeros it, and then times the 11 | reading of that memory as a series of integer loads and adds. Each 12 | four byte integer is loaded and added to accumulator. 13 | .LP 14 | The size 15 | specification may end with ``k'' or ``m'' to mean 16 | kilobytes (* 1024) or megabytes (* 1024 * 1024). 17 | .SH OUTPUT 18 | Output format is \f(CB"%0.2f %.2f\\n", megabytes, megabytes_per_second\fP, i.e., 19 | .sp 20 | .ft CB 21 | 8.00 25.33 22 | .ft 23 | .SH MEMORY UTILIZATION 24 | This benchmark should move approximately the reported amount of memory. 25 | .SH ACKNOWLEDGEMENT 26 | Funding for the development of 27 | this tool was provided by Sun Microsystems Computer Corporation. 28 | .SH "SEE ALSO" 29 | lmbench(8). 30 | -------------------------------------------------------------------------------- /lmbench/doc/bw_mmap_rd.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BW_MMAP_RD 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | bw_mmap_rd \- time the reading and summing of a file 5 | .SH SYNOPSIS 6 | .B bw_mmap_rd 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I size 17 | .I file 18 | .SH DESCRIPTION 19 | .B bw_mmap_rd 20 | creates a memory mapping to the file and then reads the mapping in an unrolled 21 | loop similar to that used in bw_mem_rd(8). 22 | The benchmark is intended to be used on a file 23 | that is in memory, i.e., the benchmark is a reread benchmark. Other 24 | file benchmarking can be done with 25 | .BR lmdd (8). 26 | .LP 27 | The size 28 | specification may end with ``k'' or ``m'' to mean 29 | kilobytes (* 1024) or megabytes (* 1024 * 1024). 30 | .SH OUTPUT 31 | Output format is \f(CB"%0.2f %.2f\\n", megabytes, megabytes_per_second\fP, i.e., 32 | .sp 33 | .ft CB 34 | 8.00 25.33 35 | .ft 36 | .SH MEMORY UTILIZATION 37 | This benchmark should move approximately the reported amount of memory. 38 | .SH ACKNOWLEDGEMENT 39 | Funding for the development of 40 | this tool was provided by Sun Microsystems Computer Corporation. 41 | .SH "SEE ALSO" 42 | lmbench(8). 43 | .SH "AUTHOR" 44 | Carl Staelin and Larry McVoy 45 | .PP 46 | Comments, suggestions, and bug reports are always welcome. 47 | -------------------------------------------------------------------------------- /lmbench/doc/bw_pipe.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BW_PIPE 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | bw_pipe \- time data movement through pipes 5 | .SH SYNOPSIS 6 | .B bw_pipe 7 | [ 8 | .I "-m " 9 | ] 10 | [ 11 | .I "-M " 12 | ] 13 | [ 14 | .I "-P " 15 | ] 16 | [ 17 | .I "-W " 18 | ] 19 | [ 20 | .I "-N " 21 | ] 22 | .SH DESCRIPTION 23 | .B bw_pipe 24 | creates a Unix pipe between two processes and moves 25 | .I "total bytes" 26 | through the pipe in 27 | .I "message size" 28 | chunks (note that pipes are typically sized smaller than that). 29 | The default 30 | .I "total bytes" 31 | is 10MB and the default 32 | .I "message size" 33 | is 64KB. 34 | .SH OUTPUT 35 | Output format is \f(CB"Pipe bandwidth: %0.2f MB/sec\\n", megabytes_per_second\fP, i.e., 36 | .sp 37 | .ft CB 38 | Pipe bandwidth: 4.87 MB/sec 39 | .ft 40 | .SH MEMORY UTILIZATION 41 | This benchmark can move up to six times the requested memory per process. 42 | There are two processes, the sender and the receiver. 43 | Most Unix 44 | systems implement the read/write system calls as a bcopy from/to kernel space 45 | to/from user space. Bcopy will use 2-3 times as much memory bandwidth: 46 | there is one read from the source and a write to the destionation. The 47 | write usually results in a cache line read and then a write back of 48 | the cache line at some later point. Memory utilization might be reduced 49 | by 1/3 if the processor architecture implemented "load cache line" 50 | and "store cache line" instructions (as well as getcachelinesize). 51 | .SH ACKNOWLEDGEMENT 52 | Funding for the development of 53 | this tool was provided by Sun Microsystems Computer Corporation. 54 | .SH "SEE ALSO" 55 | lmbench(8). 56 | .SH "AUTHOR" 57 | Carl Staelin and Larry McVoy 58 | .PP 59 | Comments, suggestions, and bug reports are always welcome. 60 | -------------------------------------------------------------------------------- /lmbench/doc/bw_reread2.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | c|c c|c c 5 | l|c c|c c 6 | l|r r|r r. 7 | Libc \fBFile\fP Memory File 8 | System bcopy \fBread\fP read mmap 9 | = 10 | DEC Alpha 38 37 64 12\ 11 | DEC Alpha 45 40 79 50\ 12 | DEC Alpha 36 36 55 19\ 13 | DEC Alpha 40 44 69 14\ 14 | DEC Alpha 46 48 88 26\ 15 | DEC Alpha 39 39 76 23\ 16 | SunOS-5.4 sun4m 23 31 59 31\ 17 | SunOS-5.4 sun4m 26 23 80 30\ 18 | SunOS-5.4 sun4d 14 23 36 25\ 19 | SunOS-5.4 sun4d 21 23 47 17\ 20 | Sun SC1000 15 20 38 28\ 21 | DEC Alpha 15 20 46 14\ 22 | Sun Ultra1 167 85 129 101\ 23 | Linux alpha 40 25 74 23\ 24 | Linux i586 31 17 61 14\ 25 | SunOS-5.4 sun4m 23 21 64 39\ 26 | Linux alpha 39 24 73 18\ 27 | Unixware/i686 55 53 214 198\ 28 | Linux i586 42 23 74 9\ 29 | IBM Power2 171 187 205 106\ 30 | IBM PowerPC 21 40 63 51\ 31 | Linux i486 17 9 33 10\ 32 | IRIX64 IP21 70 65 92 72\ 33 | Linux i686 57 46 205 34\ 34 | IRIX64-601 IP26 32 75 65 56\ 35 | Linux i586 41 21 74 13\ 36 | Linux i586 21 14 60 11\ 37 | Linux i586 21 14 58 10\ 38 | Linux i586 21 13 60 8\ 39 | HP-UX 9000/735 26 47 55 36\ 40 | HP-UX 9000/819 48 64 97 41\ 41 | HP-UX 9000/755 25 45 49 32\ 42 | FreeBSD/i586 42 38 65 49\ 43 | FreeBSD/i586 42 30 73 54\ 44 | FreeBSD/i586 41 29 65 46\ 45 | IRIX64 IP19 34 34 65 56\ 46 | FreeBSD/i586 40 28 62 47\ 47 | IRIX64 IP25 41 60 87 76\ 48 | HP-UX 9000/735 26 43 53 33\ 49 | HP-UX 9000/735 26 43 54 34\ 50 | HP-UX 9000/735 26 43 53 35\ 51 | HP-UX 9000/770 33 43 56 37\ 52 | HP-UX 9000/897 19 39 40 28\ 53 | FreeBSD/i586 41 29 65 50\ 54 | dgux mc88110 17 16 37 13\ 55 | IRIX5.3 IP22 32 32 69 44\ 56 | IRIX IP19 34 39 67 43\ 57 | IRIX64 IP19 36 36 65 56\ 58 | IRIX5.3 IP19 34 36 65 43\ 59 | IRIX IP22 33 37 68 48\ 60 | .TE 61 | .KE 62 | -------------------------------------------------------------------------------- /lmbench/doc/bw_tcp.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BW_TCP 1 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | bw_tcp \- time data movement through TCP/IP sockets 5 | .SH SYNOPSIS 6 | .B bw_tcp 7 | [ 8 | .I "-m " 9 | ] 10 | [ 11 | .I "-M " 12 | ] 13 | [ 14 | .I "-P " 15 | ] 16 | [ 17 | .I "-W " 18 | ] 19 | [ 20 | .I "-N " 21 | ] 22 | .I "server" 23 | .br or 24 | .B bw_tcp 25 | .I -s 26 | .br or 27 | .B bw_tcp 28 | .I "-S " 29 | .SH DESCRIPTION 30 | .B bw_tcp 31 | is a client/server program that moves data over a TCP/IP socket. Nothing is 32 | done with the data on either side; 33 | .I "total bytes" 34 | of data is moved in 35 | .I "message size" 36 | chunks. 37 | .LP 38 | .B bw_tcp 39 | has three forms of usage: as a server (-s), as a client (bw_tcp localhost), and 40 | as a shutdown (bw_tcp -S localhost). 41 | .LP 42 | The default amount of data is 10MB. The client form may specify a different 43 | amount of data. Specifications may end with ``k'' or ``m'' to mean 44 | kilobytes (* 1024) or megabytes (* 1024 * 1024). 45 | .SH OUTPUT 46 | Output format is 47 | .ft CB 48 | Socket bandwidth using localhost: 2.32 MB/sec 49 | .ft 50 | .SH MEMORY UTILIZATION 51 | This benchmark can move up to six times the requested memory per process 52 | when run through the loopback device. 53 | There are two processes, the sender and the receiver. 54 | Most Unix 55 | systems implement the read/write system calls as a bcopy from/to kernel space 56 | to/from user space. Bcopy will use 2-3 times as much memory bandwidth: 57 | there is one read from the source and a write to the destionation. The 58 | write usually results in a cache line read and then a write back of 59 | the cache line at some later point. Memory utilization might be reduced 60 | by 1/3 if the processor architecture implemented "load cache line" 61 | and "store cache line" instructions (as well as getcachelinesize). 62 | .SH ACKNOWLEDGEMENT 63 | Funding for the development of 64 | this tool was provided by Sun Microsystems Computer Corporation 65 | and Silicon Graphics, Inc. 66 | .SH SEE ALSO 67 | lmbench(8). 68 | .SH "AUTHOR" 69 | Carl Staelin and Larry McVoy 70 | .PP 71 | Comments, suggestions, and bug reports are always welcome. 72 | -------------------------------------------------------------------------------- /lmbench/doc/bw_tcp.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | center expand doublebox; 4 | l r. 5 | Linux alpha 8.9 6 | Linux i486 5.5 7 | Linux alpha 8.8 8 | Linux i586 3.2 9 | Linux i486 5.6 10 | Linux i586 2.9 11 | DEC Alpha 11.2 12 | Linux i586 3.0 13 | SunOS-5.4 sun4m 9.5 14 | SunOS-5.4 sun4m 11.0 15 | DEC Alpha 4.1 16 | DEC Alpha 6.6 17 | DEC Alpha 12.1 18 | Linux i586 3.0 19 | SunOS-5.4 sun4d 7.9 20 | SunOS-5.4 sun4d 9.1 21 | DEC Alpha 8.6 22 | DEC Alpha 6.0 23 | DEC Alpha 10.5 24 | Sun SC1000 10.9 25 | Linux i586 5.1 26 | DEC Alpha 9.2 27 | Linux i586 6.8 28 | FreeBSD/i586 0.1 29 | IRIX IP22 7.2 30 | Linux i686 14.7 31 | FreeBSD/i586 0.1 32 | SunOS-5.4 sun4m 19.5 33 | FreeBSD/i586 0.1 34 | Sun Ultra1 51.3 35 | FreeBSD/i586 0.2 36 | FreeBSD/i586 0.2 37 | IBM Power2 10.5 38 | IBM PowerPC 16.6 39 | dgux mc88110 4.6 40 | IRIX64 IP21 18.8 41 | IRIX IP19 16.4 42 | HP-UX 9000/735 18.4 43 | HP-UX 9000/735 19.0 44 | HP-UX 9000/735 23.9 45 | HP-UX 9000/897 16.9 46 | IRIX64-601 IP26 21.5 47 | IRIX5.3 IP22 22.1 48 | IRIX5.3 IP19 12.2 49 | IRIX64 IP19 18.8 50 | IRIX64 IP25 26.1 51 | IRIX64 IP19 30.8 52 | HP-UX 9000/770 20.5 53 | HP-UX 9000/819 27.7 54 | HP-UX 9000/755 35.2 55 | HP-UX 9000/735 19.6 56 | .TE 57 | .KE 58 | -------------------------------------------------------------------------------- /lmbench/doc/bw_unix.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BW_UNIX 8 "$Date$" "(c)1994-2000 Larry McVoy and Carl Staelin" "LMBENCH" 3 | .SH NAME 4 | bw_unix \- UNIX pipe bandwidth 5 | .SH SYNOPSIS 6 | .B bw_unix 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I size 17 | .SH DESCRIPTION 18 | .B bw_unix 19 | creates a pipe and forks a child process which keeps writing 20 | data to the pipe as fast as it can. The benchmark measures 21 | how fast the parent process can 22 | .I read 23 | the data in 24 | .IR size -byte 25 | chunks from the pipe. Nothing is done with the data in either 26 | the parent (reader) or child (writer) processes. 27 | .LP 28 | The 29 | .I size 30 | specification may end with ``k'' or ``m'' to mean 31 | kilobytes (* 1024) or megabytes (* 1024 * 1024). 32 | .SH OUTPUT 33 | Output format is \f(CB"%0.2f %.2f\\n", megabytes, megabytes_per_second\fP, i.e., 34 | .sp 35 | .ft CB 36 | 8.00 25.33 37 | .ft 38 | .SH "MEMORY UTILIZATION" 39 | This benchmark should move approximately the reported amount of memory. 40 | .SH ACKNOWLEDGEMENT 41 | Funding for the development of 42 | this tool was provided by Sun Microsystems Computer Corporation. 43 | .SH "SEE ALSO" 44 | lmbench(8). 45 | .SH "AUTHOR" 46 | Carl Staelin and Larry McVoy 47 | .PP 48 | Comments, suggestions, and bug reports are always welcome. 49 | -------------------------------------------------------------------------------- /lmbench/doc/cache.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH CACHE 8 "$Date$" "(c)2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | cache \- cache parameters 5 | .SH SYNOPSIS 6 | .B cache 7 | [ 8 | .I "-L " 9 | ] 10 | [ 11 | .I "-M " 12 | ] 13 | [ 14 | .I "-W " 15 | ] 16 | [ 17 | .I "-N " 18 | ] 19 | .SH DESCRIPTION 20 | .B cache 21 | tries to determine the characteristics of the memory hierarchy. It 22 | attempts to determine the number of caches, the size of each cache, 23 | the line size for each cache, and the available memory parallelism at 24 | each level in the memory hierarchy. 25 | The largest amount of memory it will examine is 26 | .I len 27 | bytes. 28 | .LP 29 | .B cache 30 | first attempts to determine the number and size of caches by measuring 31 | the memory latency for various memory sizes. Once it has identified 32 | the various caches it then measures the latency, parallelism, and line 33 | size for each cache. Unfortunately, determining the cache size merely 34 | from latency is exceedingly difficult due to variations in cache 35 | replacement and prefetching strategies. 36 | .SH BUGS 37 | .B cache 38 | is an experimental benchmark and is known to fail on many processors. 39 | In particular there are a large number of machines with weird caching 40 | behavior that confuse 41 | .B cache 42 | and prevent it from accurately determining the number and size of the 43 | various caches. 44 | .SH "SEE ALSO" 45 | lmbench(8), line(8), tlb(8), par_mem(8). 46 | .SH "AUTHOR" 47 | Carl Staelin and Larry McVoy 48 | .PP 49 | Comments, suggestions, and bug reports are always welcome. 50 | -------------------------------------------------------------------------------- /lmbench/doc/ctx.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | c|c s|c s 5 | l|c c|c c 6 | l|r r|r r. 7 | 2 processes 8 processes 8 | System \fB0KB\fP 32KB 0KB 32KB 9 | = 10 | Linux alpha 10 17 13 41\ 11 | Linux i486 11 394 18 594\ 12 | Linux alpha 11 73 13 92\ 13 | Linux i486 -1 70 -1 78\ 14 | Linux i586 10 163 13 215\ 15 | DEC Alpha 25 18 42 21\ 16 | SunOS-5.4 sun4m 37 128 52 73\ 17 | DEC Alpha 39 55 46 112\ 18 | DEC Alpha 53 50 56 62\ 19 | DEC Alpha 53 66 59 93\ 20 | DEC Alpha 59 68 115 134\ 21 | DEC Alpha 14 27 22 159\ 22 | DEC Alpha 40 42 46 205\ 23 | Sun Ultra1 14 27 20 73\ 24 | Unixware/i686 21 22 \ 25 | DEC Alpha 43 142 45 197\ 26 | SunOS-5.4 sun4m 54 65 85 102\ 27 | SunOS-5.4 sun4m 75 31 110 102\ 28 | IBM Power2 13 16 18 43\ 29 | HP-UX 9000/819 13 41 15 109\ 30 | HP-UX 9000/755 25 29 29 220\ 31 | HP-UX 9000/735 29 39 31 204\ 32 | HP-UX 9000/735 29 42 34 205\ 33 | HP-UX 9000/735 29 32 30 164\ 34 | Linux i586 36 163 47 222\ 35 | Linux i686 6 22 7 107\ 36 | Linux i586 13 178 20 273\ 37 | Linux i586 13 182 21 232\ 38 | Linux i586 16 218 22 266\ 39 | Linux i586 66 240 83 347\ 40 | Sun SC1000 107 135 104 362\ 41 | SunOS-5.4 sun4d 137 245 164 486\ 42 | SunOS-5.4 sun4d 224 113 245 134\ 43 | FreeBSD/i586 28 67 34 158\ 44 | IRIX5.3 IP22 40 47 38 104\ 45 | IBM PowerPC 16 87 26 144\ 46 | FreeBSD/i586 30 54 36 137\ 47 | FreeBSD/i586 24 54 28 137\ 48 | IRIX64 IP21 84 104 87 101\ 49 | dgux mc88110 89 119 122 263\ 50 | HP-UX 9000/897 20 39 23 111\ 51 | HP-UX 9000/735 27 37 30 222\ 52 | FreeBSD/i586 29 41 35 123\ 53 | FreeBSD/i586 29 -13 36 78\ 54 | IRIX IP22 38 50 42 74\ 55 | IRIX64-601 IP26 72 92 74 93\ 56 | IRIX64 IP19 59 68 79 91\ 57 | IRIX64 IP25 55 77 59 85\ 58 | IRIX64 IP19 63 80 69 93\ 59 | IRIX IP19 141 150 96 115\ 60 | HP-UX 9000/770 21 24 21 218\ 61 | IRIX5.3 IP19 150 157 102 167\ 62 | .TE 63 | .KE 64 | -------------------------------------------------------------------------------- /lmbench/doc/lat_allmem.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l c c c 5 | l c c c 6 | l r r r. 7 | Level 1 Level 2 Main 8 | System cache cache memory 9 | = 10 | Linux i586 8 103 151\ 11 | DEC Alpha 12 67 291\ 12 | Linux i586 8 107 150\ 13 | DEC Alpha 10 56 321\ 14 | Unixware/i686 14 34 196\ 15 | DEC Alpha 9 51 288\ 16 | DEC Alpha 7 47 458\ 17 | DEC Alpha 12 57 468\ 18 | SunOS-5.4 sun4m 13 -- 180\ 19 | SunOS-5.4 sun4m 20 -- 291\ 20 | SunOS-5.4 sun4m 16 115 816\ 21 | Sun Ultra1 6 42 270\ 22 | SunOS-5.4 sun4d 16 116 995\ 23 | IBM Power2 -- 13 141\ 24 | IBM PowerPC 6 164 394\ 25 | DEC Alpha 10 53 477\ 26 | FreeBSD/i586 10 115 179\ 27 | FreeBSD/i586 7 111 181\ 28 | DEC Alpha 13 104 957\ 29 | FreeBSD/i586 10 118 180\ 30 | FreeBSD/i586 10 101 180\ 31 | HP-UX 9000/735 -- 10 347\ 32 | Sun SC1000 20 140 1236\ 33 | HP-UX 9000/770 -- 9 376\ 34 | SunOS-5.4 sun4d 24 173 1246\ 35 | Linux i686 12 90 194\ 36 | Linux i586 10 190 320\ 37 | Linux i586 10 148 320\ 38 | Linux i586 10 198 321\ 39 | Linux i586 10 222 321\ 40 | Linux i486 12 234 336\ 41 | Linux alpha 3 83 354\ 42 | Linux alpha 3 43 361\ 43 | DEC Alpha 3 42 396\ 44 | HP-UX 9000/735 -- 10 348\ 45 | IRIX5.3 IP22 10 76 1018\ 46 | IRIX64 IP25 8 58 1134\ 47 | HP-UX 9000/735 -- 10 347\ 48 | HP-UX 9000/897 -- 11 424\ 49 | HP-UX 9000/819 -- 10 430\ 50 | IRIX64 IP21 11 100 709\ 51 | IRIX64 IP19 10 75 1150\ 52 | IRIX IP19 8 64 1189\ 53 | IRIX5.3 IP19 10 75 1149\ 54 | IRIX64 IP19 10 70 1152\ 55 | IRIX IP22 8 64 1170\ 56 | FreeBSD/i586 10 106 181\ 57 | HP-UX 9000/735 -- 10 348\ 58 | HP-UX 9000/755 -- 10 393\ 59 | dgux mc88110 22 319 753\ 60 | IRIX64-601 IP26 13 120 1244\ 61 | .TE 62 | .KE 63 | -------------------------------------------------------------------------------- /lmbench/doc/lat_allproc.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l|c|c|c 5 | l|r|r|r. 6 | fork \fBfork, exec\fP fork, exec 7 | System & exit \fB& exit\fP sh -c & exit 8 | = 9 | DEC Alpha 4.6 13\ 42\ 10 | DEC Alpha 3.3 11\ 44\ 11 | Linux alpha 0.7 3\ 12\ 12 | Linux alpha 1.0 2\ 16\ 13 | DEC Alpha 2.0 6\ 43\ 14 | DEC Alpha 4.8 16\ 64\ 15 | Linux i686 0.5 5\ 17\ 16 | DEC Alpha 3.1 10\ 281\ 17 | Linux i586 0.9 5\ 16\ 18 | DEC Alpha 5.3 14\ 27\ 19 | DEC Alpha 5.1 15\ 89\ 20 | Sun Ultra1 3.7 20\ 10\ 21 | SunOS-5.4 sun4m 8.0 46\ 237\ 22 | SunOS-5.4 sun4m 18.0 83\ 37\ 23 | SunOS-5.4 sun4m 10.7 57\ 87\ 24 | Linux i486 3.3 10\ 112\ 25 | Linux i586 1.6 12\ 44\ 26 | SunOS-5.4 sun4d 13.7 75\ 113\ 27 | IBM Power2 1.2 8\ 16\ 28 | IBM PowerPC 2.9 8\ 50\ 29 | SunOS-5.4 sun4d 20.8 93\ 136\ 30 | HP-UX 9000/735 1.3 3\ 17\ 31 | IRIX5.3 IP19 4.3 8\ 20\ 32 | IRIX5.3 IP22 3.1 8\ 19\ 33 | IRIX64-601 IP26 4.6 24\ 39\ 34 | IRIX IP22 3.0 8\ 22\ 35 | Linux i586 2.4 9\ 26\ 36 | Linux i586 1.8 15\ 30\ 37 | Linux i586 1.9 15\ 30\ 38 | Linux i586 3.1 24\ 73\ 39 | DEC Alpha 13.4 33\ 39\ 40 | Sun SC1000 14.0 69\ 175\ 41 | FreeBSD/i586 2.9 14\ 22\ 42 | FreeBSD/i586 2.7 13\ 21\ 43 | IRIX64 IP21 4.2 14\ 30\ 44 | HP-UX 9000/770 3.1 9\ 18\ 45 | FreeBSD/i586 2.8 13\ 22\ 46 | HP-UX 9000/735 3.5 10\ 20\ 47 | HP-UX 9000/735 3.5 10\ 19\ 48 | IRIX64 IP19 4.5 19\ 37\ 49 | HP-UX 9000/819 4.2 67\ 118\ 50 | HP-UX 9000/755 3.6 10\ 18\ 51 | HP-UX 9000/897 6.7 15\ 37\ 52 | IRIX IP19 6.2 19\ 46\ 53 | HP-UX 9000/735 3.5 10\ 20\ 54 | FreeBSD/i586 2.7 12\ 20\ 55 | FreeBSD/i586 3.0 14\ 23\ 56 | IRIX64 IP25 3.3 12\ 24\ 57 | IRIX64 IP19 4.0 14\ 24\ 58 | dgux mc88110 8.8 13\ 67\ 59 | .TE 60 | .KE 61 | -------------------------------------------------------------------------------- /lmbench/doc/lat_connect.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_CONNECT 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_connect \- measure interprocess connection latency via TCP/IP 5 | .SH SYNOPSIS 6 | .B lat_connect 7 | .I -s 8 | .sp .5 9 | .B lat_connect 10 | [ 11 | .I "-P " 12 | ] 13 | [ 14 | .I "-W " 15 | ] 16 | [ 17 | .I "-N " 18 | ] 19 | .I hostname 20 | .sp .5 21 | .B lat_connect 22 | .I "-S hostname" 23 | .SH DESCRIPTION 24 | .B lat_connect 25 | is a client/server program that measures interprocess 26 | connection latencies. The benchmark times the creation and connection of 27 | an AF_INET (aka TCP/IP) socket to a remote server. Care is take that the 28 | connection time does not include any other overhead, such as the 29 | \fIgethostbyname()\fP or remote port lookups since these add more overhead 30 | than the connection establishment itself. 31 | .LP 32 | .B lat_connect 33 | has three forms of usage: as a server (-s), as a client (lat_connect localhost), 34 | and as a shutdown (lat_connect -S localhost). 35 | .SH OUTPUT 36 | The reported time is in microseconds per connection. 37 | Output format is like so 38 | .sp 39 | .ft CB 40 | TCP/IP connection cost to localhost: 1006 microseconds 41 | .ft 42 | .SH "SEE ALSO" 43 | lmbench(8). 44 | .SH "AUTHOR" 45 | Carl Staelin and Larry McVoy 46 | .PP 47 | Comments, suggestions, and bug reports are always welcome. 48 | -------------------------------------------------------------------------------- /lmbench/doc/lat_connect.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | center expand doublebox; 4 | l r. 5 | DEC Alpha 976 6 | Linux i586 606 7 | IRIX IP22 470 8 | SunOS-5.4 sun4d 852 9 | SunOS-5.4 sun4d 3123 10 | Sun SC1000 4594 11 | IRIX64-601 IP26 316 12 | Linux i586 1155 13 | IRIX5.3 IP22 349 14 | IRIX64 IP21 667 15 | IBM Power2 339 16 | dgux mc88110 4635 17 | DEC Alpha 4700 18 | HP-UX 9000/770 319 19 | HP-UX 9000/755 384 20 | HP-UX 9000/735 389 21 | IRIX64 IP25 716 22 | IRIX64 IP19 763 23 | IRIX5.3 IP19 694 24 | Linux i686 746 25 | Linux i586 775 26 | Linux i586 779 27 | Linux i586 835 28 | Linux i586 1348 29 | Linux i486 1439 30 | DEC Alpha 3047 31 | FreeBSD/i586 454 32 | HP-UX 9000/897 765 33 | FreeBSD/i586 465 34 | FreeBSD/i586 454 35 | FreeBSD/i586 397 36 | IRIX IP19 697 37 | HP-UX 9000/735 388 38 | IRIX64 IP19 805 39 | HP-UX 9000/735 459 40 | HP-UX 9000/819 585 41 | HP-UX 9000/735 740 42 | FreeBSD/i586 481 43 | .TE 44 | .KE 45 | -------------------------------------------------------------------------------- /lmbench/doc/lat_disk.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | center expand doublebox; 4 | l r. 5 | SunOS-5.4 sun4m 2876 6 | Sun SC1000 1466 7 | DEC Alpha 1436 8 | DEC Alpha 1995 9 | IRIX IP22 984 10 | Sun Ultra1 2242 11 | HP-UX 9000/770 732 12 | IRIX IP19 920 13 | IRIX5.3 IP22 1265 14 | IRIX5.3 IP19 991 15 | DEC Alpha 2057 16 | DEC Alpha 3729 17 | FreeBSD/i586 297 18 | FreeBSD/i586 306 19 | FreeBSD/i586 2314 20 | FreeBSD/i586 2284 21 | FreeBSD/i586 310 22 | .TE 23 | .KE 24 | -------------------------------------------------------------------------------- /lmbench/doc/lat_fcntl.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_FCNTL 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_fcntl \- fcntl file locking benchmark 5 | .SH SYNOPSIS 6 | .B lat_ctx 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .SH DESCRIPTION 17 | .B lat_fcntl 18 | is a client/server program that measures file locking latencies. The 19 | benchmark alternately locks and unlocks files so that only one of the 20 | client or server is running at a time, similar to ``hot potato'' 21 | message passing benchmarks. 22 | No other work is done in the processes. 23 | .SH ACKNOWLEDGEMENT 24 | Funding for the development of 25 | this tool was provided by Sun Microsystems Computer Corporation. 26 | .SH "SEE ALSO" 27 | lmbench(8), lat_fifo(8), lat_tcp(8), lat_udp(8), lat_unix(8). 28 | .SH "AUTHOR" 29 | Carl Staelin and Larry McVoy 30 | .PP 31 | Comments, suggestions, and bug reports are always welcome. 32 | 33 | -------------------------------------------------------------------------------- /lmbench/doc/lat_fifo.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_FIFO 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_fifo \- FIFO benchmark 5 | .SH SYNOPSIS 6 | .B lat_ctx 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .SH DESCRIPTION 17 | .B lat_fifo 18 | is a client/server program that measures interprocess 19 | communication latencies. The benchmark passes a message back and forth between 20 | the two processes (this sort of benchmark is frequently referred to as a 21 | ``hot potato'' benchmark). No other work is done in the processes. 22 | The message is passed back and forth using FIFOs. 23 | .SH ACKNOWLEDGEMENT 24 | Funding for the development of 25 | this tool was provided by Sun Microsystems Computer Corporation. 26 | .SH "SEE ALSO" 27 | lmbench(8), lat_fcntl(8), lat_tcp(8), lat_udp(8), lat_unix(8). 28 | .SH "AUTHOR" 29 | Carl Staelin and Larry McVoy 30 | .PP 31 | Comments, suggestions, and bug reports are always welcome. 32 | 33 | -------------------------------------------------------------------------------- /lmbench/doc/lat_fs.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_FS 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_fs \- measure file system create/delete performance 5 | .SH SYNOPSIS 6 | .B lat_fs 7 | [ 8 | .I dir 9 | ] 10 | .SH DESCRIPTION 11 | .B lat_fs 12 | is a program that creates a number of small files in the current working 13 | directory and then removes the files. Both the creation and removal of 14 | the files is timed. 15 | .SH OPTIONS 16 | If 17 | .I dir 18 | is specified, 19 | .B lat_fs 20 | will change to that directory first and do the creates and deletes there. 21 | Otherwise the creates and deletes are done in $PWD. 22 | .SH OUTPUT 23 | The results are in terms of creates per second and deletes per second 24 | as a function of file size. The output is in 4 column form and is the 25 | size of the file, the number created, the creations per second, and the 26 | removals per second. Output format looks like: 27 | .sp 28 | .ft CB 29 | .nf 30 | 0k 500 1304 2740 31 | 1k 500 904 1663 32 | 4k 500 861 1647 33 | 10k 500 674 1516 34 | .fi 35 | .ft 36 | .SH "SEE ALSO" 37 | lmbench(8). 38 | -------------------------------------------------------------------------------- /lmbench/doc/lat_fs.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l c c 5 | l r r. 6 | System Create \fBDelete\fP 7 | = 8 | Linux i586 1.4 0.1 9 | IRIX64-601 IP26 0.9 0.1 10 | Linux i586 1.5 0.1 11 | Linux i586 1.1 0.1 12 | Linux i586 1.4 0.1 13 | Linux i686 1.2 0.1 14 | SunOS-5.4 sun4d 0.7 0.4 15 | SunOS-5.4 sun4d 18.2 8.3 16 | Linux i586 1.4 0.1 17 | Linux i486 0.8 0.1 18 | Linux i486 0.8 0.1 19 | Linux i586 2.7 0.2 20 | Sun SC1000 3.7 1.3 21 | Linux alpha 4.3 4.2 22 | DEC Alpha 25.0 11.4 23 | DEC Alpha 25.0 11.1 24 | DEC Alpha 0.8 0.3 25 | DEC Alpha 1.3 0.5 26 | DEC Alpha 38.5 12.3 27 | DEC Alpha 33.3 11.9 28 | DEC Alpha 23.3 11.5 29 | IRIX64 IP25 3.5 4.0 30 | IRIX64 IP19 3.1 5.0 31 | IRIX IP22 13.3 8.4 32 | Linux alpha 25.0 11.5 33 | DEC Alpha 25.6 14.1 34 | dgux mc88110 2.4 0.5 35 | HP-UX 9000/735 2.8 3.9 36 | FreeBSD/i586 20.0 8.3 37 | FreeBSD/i586 20.4 8.3 38 | FreeBSD/i586 22.7 8.3 39 | FreeBSD/i586 22.7 8.3 40 | FreeBSD/i586 19.6 8.3 41 | IRIX IP19 12.0 11.8 42 | IRIX5.3 IP19 11.5 11.2 43 | IBM Power2 13.3 12.8 44 | IRIX5.3 IP22 9.4 8.5 45 | HP-UX 9000/735 28.6 11.5 46 | IRIX64 IP21 11.9 11.5 47 | IBM PowerPC 12.7 12.7 48 | HP-UX 9000/770 20.0 11.1 49 | HP-UX 9000/735 15.4 11.1 50 | HP-UX 9000/819 3.7 11.8 51 | HP-UX 9000/897 58.8 17.2 52 | HP-UX 9000/755 26.3 11.2 53 | IRIX64 IP19 12.5 9.8 54 | HP-UX 9000/735 26.3 12.0 55 | .TE 56 | .KE 57 | -------------------------------------------------------------------------------- /lmbench/doc/lat_http.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_FCNTL 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_fcntl \- fcntl file locking benchmark 5 | .SH SYNOPSIS 6 | .B lat_ctx 7 | [ 8 | .I "-d" 9 | ] 10 | [ 11 | .I "-e" 12 | ] 13 | [ 14 | .I "-S" 15 | ] 16 | .I serverhost 17 | [ 18 | .I port 19 | ] 20 | .SH DESCRIPTION 21 | .B lat_http 22 | is a client/server program that measures simple http transaction 23 | latencies. It has its own HTTP server, and it is meant to simply 24 | measure the minimum overall costs of simple HTTP ``GET'' 25 | transactions. It does not measure the performance of third-party HTTP 26 | servers. 27 | .LP 28 | The client simply makes a series of HTTP GET requests for files. The 29 | files are a fixed set of files included with the benchmark. No 30 | special care was made to ensure that the file sizes match and 31 | predetermined distribution. 32 | .SH ACKNOWLEDGEMENT 33 | Funding for the development of 34 | this tool was provided by Sun Microsystems Computer Corporation. 35 | .SH "SEE ALSO" 36 | lmbench(8), lat_connect(8), lat_tcp(8), lat_sig(8). 37 | .SH "AUTHOR" 38 | Carl Staelin and Larry McVoy 39 | .PP 40 | Comments, suggestions, and bug reports are always welcome. 41 | 42 | -------------------------------------------------------------------------------- /lmbench/doc/lat_ipc.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l l c c c 5 | l l r r r. 6 | System Network \fBTCP bw\fP TCP latency UDP latency 7 | = 8 | IRIX IP21 hippi 62 1068 1099 9 | SunOS-5.5 sun4u@167 100baseT 9.5 280 308 10 | HP-UX 9000/735 fddi 8.8 425 441 11 | IRIX IP22 10baseT .9 543 602 12 | IRIX IP21 10baseT .9 1463 1376 13 | HP-UX 9000/735 10baseT .9 592 603 14 | Linux 10baseT .7 2954 1912 15 | .TE 16 | .KE 17 | -------------------------------------------------------------------------------- /lmbench/doc/lat_mmap.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_MMAP 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_mmap \- costs of mmapping and unmmapping varying file sizes 5 | .SH SYNOPSIS 6 | .B lat_mmap 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I size 17 | .I file 18 | .SH DESCRIPTION 19 | .B lat_mmap 20 | times how fast a mapping can be made and unmade. This is useful because it 21 | is a fundemental part of processes that use SunOS style shared libraries 22 | (the libraries are mapped in at process start up time and unmapped at 23 | process exit). 24 | .LP 25 | The benchmark maps in and unmaps the first \fIsize\fP bytes of the file 26 | repeatedly and reports the average time for one mapping/unmapping. 27 | .LP 28 | The size 29 | specification may end with ``k'' or ``m'' to mean 30 | kilobytes (* 1024) or megabytes (* 1024 * 1024). 31 | .SH OUTPUT 32 | Output format is \f(CB"%0.2f %d\\n", megabytes, usecs\fP, i.e., 33 | .sp 34 | .ft CB 35 | 8.00 1200 36 | .ft 37 | .SH ACKNOWLEDGEMENT 38 | Funding for the development of 39 | this tool was provided by Sun Microsystems Computer Corporation. 40 | .SH "SEE ALSO" 41 | lmbench(8). 42 | .SH "AUTHOR" 43 | Carl Staelin and Larry McVoy 44 | .PP 45 | Comments, suggestions, and bug reports are always welcome. 46 | -------------------------------------------------------------------------------- /lmbench/doc/lat_nullsys.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | center expand doublebox; 4 | l r. 5 | SunOS-5.4 sun4m 7 6 | Sun SC1000 9 7 | SunOS-5.4 sun4d 12 8 | SunOS-5.4 sun4m 9 9 | SunOS-5.4 sun4m 13 10 | Linux alpha 2 11 | Linux i586 2 12 | Linux i586 2 13 | Unixware/i686 5 14 | Sun Ultra1 5 15 | DEC Alpha 9 16 | Linux i586 3 17 | Linux i586 3 18 | Linux alpha 3 19 | DEC Alpha 11 20 | DEC Alpha 12 21 | DEC Alpha 15 22 | IBM PowerPC 12 23 | DEC Alpha 17 24 | FreeBSD/i586 7 25 | FreeBSD/i586 9 26 | FreeBSD/i586 10 27 | DEC Alpha 17 28 | FreeBSD/i586 7 29 | SunOS-5.4 sun4d 26 30 | Linux i686 4 31 | Linux i586 5 32 | Linux i586 5 33 | Linux i486 6 34 | Linux i486 6 35 | DEC Alpha 9 36 | DEC Alpha 13 37 | HP-UX 9000/735 12 38 | HP-UX 9000/735 13 39 | HP-UX 9000/735 14 40 | IRIX5.3 IP19 20 41 | HP-UX 9000/755 14 42 | HP-UX 9000/819 19 43 | IRIX64 IP25 23 44 | IRIX IP22 10 45 | IRIX IP19 16 46 | IRIX64 IP19 18 47 | IRIX64 IP19 24 48 | FreeBSD/i586 9 49 | HP-UX 9000/770 11 50 | HP-UX 9000/897 92 51 | HP-UX 9000/735 12 52 | dgux mc88110 75 53 | IBM Power2 16 54 | IRIX64-601 IP26 20 55 | IRIX64 IP21 25 56 | IRIX5.3 IP22 11 57 | .TE 58 | .KE 59 | -------------------------------------------------------------------------------- /lmbench/doc/lat_ops.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_OPS 8 "$Date$" "(c)2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_ops \- basic CPU operation parallelism 5 | .SH SYNOPSIS 6 | .B lat_ops 7 | [ 8 | .I "-W " 9 | ] 10 | [ 11 | .I "-N " 12 | ] 13 | .SH DESCRIPTION 14 | .B lat_ops 15 | measures the latency of basic CPU operations, such as 16 | integer ADD. 17 | .TP 18 | integer bit, add, mul, div, mod operations 19 | maximum parallelism for integer XOR, ADD, MUL, DIV, MOD operations. 20 | .TP 21 | uint64 bit, add, mul, div, mod operations 22 | maximum parallelism for uint64 XOR, ADD, MUL, DIV, MOD operations. 23 | .TP 24 | float add, mul, div operations 25 | maximum parallelism for flot ADD, MUL, DIV operations. 26 | .TP 27 | double add, mul, div operations 28 | maximum parallelism for flot ADD, MUL, DIV operations. 29 | .SH BUGS 30 | This benchmark is highly experimental and may sometimes (frequently?) 31 | give erroneous results. 32 | .SH "SEE ALSO" 33 | lmbench(8), par_ops(8). 34 | .SH "AUTHOR" 35 | Carl Staelin and Larry McVoy 36 | .PP 37 | Comments, suggestions, and bug reports are always welcome. 38 | -------------------------------------------------------------------------------- /lmbench/doc/lat_pagefault.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_PAGEFAULT 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_pagefault \- measure the cost of pagefaulting pages from a file 5 | .SH SYNOPSIS 6 | .B lat_pagefault 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I file 17 | [ 18 | .I file.... 19 | ] 20 | .SH DESCRIPTION 21 | .B lat_pagefault 22 | times how fast a page of a file can be faulted in. The file is flushed from 23 | (local) memory by using the \f(CBmsync()\fP interface with the invalidate 24 | flag set. (Note that NFS does not send this over the wire so this makes 25 | for a handy way to measure the cost of going across the wire.) 26 | .LP 27 | The benchmark maps in the entire file and the access pages backwards using 28 | a stride of 256K kilobytes. 29 | .SH OUTPUT 30 | Output format is below; it prints the average cost of page faulting a page. 31 | .sp 32 | .ft CB 33 | Pagefaults on : usecs 34 | .ft 35 | .SH BUGS 36 | Using a stride of 256K may be a bad idea because SCSI controllers 37 | may have caches bigger than that. 38 | .SH ACKNOWLEDGEMENT 39 | Funding for the development of 40 | this tool was provided by Sun Microsystems Computer Corporation. 41 | .SH "SEE ALSO" 42 | lmbench(8). 43 | .SH "AUTHOR" 44 | Carl Staelin and Larry McVoy 45 | .PP 46 | Comments, suggestions, and bug reports are always welcome. 47 | -------------------------------------------------------------------------------- /lmbench/doc/lat_pipe.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_PIPE 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_pipe \- measure interprocess communication latency through pipes 5 | .SH SYNOPSIS 6 | .B lat_pipe 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .SH DESCRIPTION 17 | .B lat_pipe 18 | uses two processes communicating through a Unix pipe to measure interprocess 19 | communication latencies. The benchmark passes a token back and forth between 20 | the two processes (this sort of benchmark is frequently referred to as a 21 | ``hot potato'' benchmark). No other work is done in the processes. 22 | .SH OUTPUT 23 | The reported time is in microseconds per round trip and includes the total 24 | time, i.e., the context switching overhead is includeded. 25 | Output format is like so 26 | .sp 27 | .ft CB 28 | Pipe latency: 491 microseconds 29 | .ft 30 | .SH ACKNOWLEDGEMENT 31 | Funding for the development of 32 | this tool was provided by Sun Microsystems Computer Corporation. 33 | .SH "SEE ALSO" 34 | lmbench(8). 35 | .SH "AUTHOR" 36 | Carl Staelin and Larry McVoy 37 | .PP 38 | Comments, suggestions, and bug reports are always welcome. 39 | -------------------------------------------------------------------------------- /lmbench/doc/lat_pipe.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | center expand doublebox; 4 | l r. 5 | SunOS-5.4 sun4m 194 6 | SunOS-5.4 sun4m 150 7 | DEC Alpha 141 8 | Linux alpha 34 9 | Linux i486 56 10 | Linux i486 56 11 | Unixware/i686 86 12 | Linux i586 33 13 | Sun Ultra1 62 14 | SunOS-5.4 sun4m 372 15 | Linux alpha 34 16 | DEC Alpha 162 17 | DEC Alpha 191 18 | Linux i586 42 19 | DEC Alpha 71 20 | DEC Alpha 179 21 | Sun SC1000 278 22 | IBM PowerPC 65 23 | dgux mc88110 474 24 | SunOS-5.4 sun4d 519 25 | FreeBSD/i586 104 26 | FreeBSD/i586 111 27 | FreeBSD/i586 115 28 | SunOS-5.4 sun4d 671 29 | Linux i586 84 30 | Linux i686 31 31 | Linux i586 43 32 | Linux i586 43 33 | Linux i586 140 34 | DEC Alpha 185 35 | DEC Alpha 198 36 | DEC Alpha 278 37 | HP-UX 9000/755 193 38 | HP-UX 9000/897 118 39 | IRIX64 IP19 187 40 | HP-UX 9000/770 148 41 | HP-UX 9000/819 113 42 | HP-UX 9000/735 181 43 | FreeBSD/i586 115 44 | IRIX IP22 118 45 | HP-UX 9000/735 178 46 | HP-UX 9000/735 169 47 | HP-UX 9000/735 172 48 | IRIX64 IP21 264 49 | IRIX5.3 IP19 366 50 | IBM Power2 91 51 | IRIX64 IP25 230 52 | IRIX64-601 IP26 222 53 | IRIX64 IP19 251 54 | IRIX IP19 333 55 | FreeBSD/i586 127 56 | IRIX5.3 IP22 131 57 | .TE 58 | .KE 59 | -------------------------------------------------------------------------------- /lmbench/doc/lat_proc.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_PROC 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_proc \- process creation tests 5 | .SH SYNOPSIS 6 | .B lat_proc 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I "procedure|fork|exec|shell" 17 | .SH DESCRIPTION 18 | .B lat_proc 19 | creates processes in three different forms, each more expensive than the last. 20 | The purposes is to measure the time that it takes to create a basic thread 21 | of control. 22 | .LP 23 | The forms are listed and described below: 24 | .TP 20 25 | Process fork+exit 26 | The time it takes to split a process into two (nearly) identical copies 27 | and have one exit. This is how new processes are created but is not 28 | very useful since both processes are doing the same thing. 29 | .TP 30 | Process fork+execve 31 | The time it takes to create a new process and have that new process run a new 32 | program. This is the inner loop of all shells (command interpreters). 33 | .TP 34 | Process fork+/bin/sh -c 35 | The time it takes to create a new process and have that new process run a new 36 | program by asking the system shell to find that program and run it. This is 37 | how the C library interface called \f(CBsystem\fP is implemented. It is the 38 | most general and the most expensive. 39 | .SH OUTPUT 40 | Output is in microseconds per operation like so: 41 | .sp 42 | .ft CB 43 | .nf 44 | Process fork+exit: 6054 microseconds 45 | Process fork+execve: 11212 microseconds 46 | Process fork+/bin/sh -c: 44346 microseconds 47 | .br 48 | .fi 49 | .ft 50 | .SH ACKNOWLEDGEMENT 51 | Funding for the development of 52 | this tool was provided by Sun Microsystems Computer Corporation. 53 | .SH "SEE ALSO" 54 | lmbench(8). 55 | .SH "AUTHOR" 56 | Carl Staelin and Larry McVoy 57 | .PP 58 | Comments, suggestions, and bug reports are always welcome. 59 | -------------------------------------------------------------------------------- /lmbench/doc/lat_rpc.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_RPC 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_rpc \- measure interprocess communication latency via Sun RPC 5 | .SH SYNOPSIS 6 | .B lat_rpc 7 | .I -s 8 | .sp .5 9 | .B lat_rpc 10 | [ 11 | .I "-P " 12 | ] 13 | [ 14 | .I "-W " 15 | ] 16 | [ 17 | .I "-N " 18 | ] 19 | [ 20 | .I "-p tcp|udp" 21 | ] 22 | .I hostname 23 | [ 24 | .I "udp|tcp" 25 | ] 26 | .sp .5 27 | .B lat_rpc 28 | .I "-S hostname" 29 | .SH DESCRIPTION 30 | .B lat_rpc 31 | is a client/server program that measures interprocess 32 | communication latencies. The benchmark passes a token back and forth between 33 | the two processes (this sort of benchmark is frequently referred to as a 34 | ``hot potato'' benchmark). No other work is done in the processes. 35 | .LP 36 | This benchmark may be compared to the TCP and UDP forms of the same benchmark 37 | to accurately see the cost of using RPC versus the cost of using plain 38 | old TCP or UDP sockets. It is worth noting that the RPC form is passing 39 | back and forth a single byte, not some long complicated record. 40 | .LP 41 | .B lat_rpc 42 | has three forms of usage: as a server (-s), as a client (lat_rpc localhost), and 43 | as a shutdown (lat_rpc -S localhost). 44 | .LP 45 | The client form may specify the protocol over which the RPCs are performed. 46 | The default is to measure performance for both 47 | .I udp 48 | and 49 | .IR tcp . 50 | .SH OUTPUT 51 | The reported time is in microseconds per round trip and includes the total 52 | time, i.e., the context switching overhead is includeded. 53 | Output format is like so 54 | .sp 55 | .ft CB 56 | RPC/udp latency using localhost: 1344 microseconds 57 | .br 58 | RPC/tcp latency using localhost: 2089 microseconds 59 | .ft 60 | .SH ACKNOWLEDGEMENT 61 | Funding for the development of 62 | this tool was provided by Sun Microsystems Computer Corporation. 63 | .SH "SEE ALSO" 64 | lmbench(8). 65 | .SH "AUTHOR" 66 | Carl Staelin and Larry McVoy 67 | .PP 68 | Comments, suggestions, and bug reports are always welcome. 69 | -------------------------------------------------------------------------------- /lmbench/doc/lat_select.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_SELECT 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_select \- select benchmark 5 | .SH SYNOPSIS 6 | .B lat_ctx 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | [ 17 | .I "n" 18 | ] 19 | .SH DESCRIPTION 20 | .B lat_select 21 | measures the time to do a select on 22 | .I n 23 | file descriptors. 24 | .SH ACKNOWLEDGEMENT 25 | Funding for the development of 26 | this tool was provided by Sun Microsystems Computer Corporation. 27 | .SH "SEE ALSO" 28 | lmbench(8). 29 | .SH "AUTHOR" 30 | Carl Staelin and Larry McVoy 31 | .PP 32 | Comments, suggestions, and bug reports are always welcome. 33 | 34 | -------------------------------------------------------------------------------- /lmbench/doc/lat_sig.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_SIG 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_sig \- select benchmark 5 | .SH SYNOPSIS 6 | .B lat_ctx 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I "install|catch|prot" 17 | [ 18 | .I "file" 19 | ] 20 | .SH DESCRIPTION 21 | .B lat_sig 22 | measures the time to install and catch signals. It can also measure 23 | the time to catch a protection fault. 24 | .SH ACKNOWLEDGEMENT 25 | Funding for the development of 26 | this tool was provided by Sun Microsystems Computer Corporation. 27 | .SH "SEE ALSO" 28 | lmbench(8). 29 | .SH "AUTHOR" 30 | Carl Staelin and Larry McVoy 31 | .PP 32 | Comments, suggestions, and bug reports are always welcome. 33 | 34 | -------------------------------------------------------------------------------- /lmbench/doc/lat_signal.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l c c 5 | l r r. 6 | System sigaction \fBsig handler\fP 7 | = 8 | DEC Alpha 20 30 9 | IRIX5.3 IP22 5 9 10 | IRIX IP22 10 12 11 | IRIX64-601 IP26 11 10 12 | Linux i586 11 22 13 | Linux i586 12 22 14 | DEC Alpha 5 101 15 | Linux alpha 13 38 16 | Linux i486 6 45 17 | Linux alpha 18 37 18 | Linux i586 9 25 19 | Linux i586 8 50 20 | dgux mc88110 5 16 21 | FreeBSD/i586 4 16 22 | FreeBSD/i586 10 34 23 | Linux i486 7 52 24 | FreeBSD/i586 9 34 25 | DEC Alpha 6 138 26 | IRIX64 IP19 6 9 27 | IRIX5.3 IP19 4 8 28 | IRIX64 IP21 5 13 29 | Linux i686 4 14 30 | Linux i586 4 23 31 | Linux i586 6 23 32 | HP-UX 9000/897 10 38 33 | IRIX64 IP19 4 35 34 | HP-UX 9000/770 10 37 35 | HP-UX 9000/819 11 54 36 | HP-UX 9000/755 10 52 37 | HP-UX 9000/735 10 38 38 | HP-UX 9000/735 6 32 39 | IRIX IP19 6 79 40 | HP-UX 9000/735 5 55 41 | IRIX64 IP25 5 55 42 | IBM PowerPC 5 19 43 | FreeBSD/i586 13 56 44 | IBM Power2 52 355 45 | HP-UX 9000/735 15 47 46 | FreeBSD/i586 18 52 47 | .TE 48 | .KE 49 | -------------------------------------------------------------------------------- /lmbench/doc/lat_syscall.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_SYSCALL 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_syscall - time simple entry into the operating system 5 | .SH SYNOPSIS 6 | .B lat_syscall 7 | [ 8 | .I "-P " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .I "null|read|write|stat|fstat|open" 17 | [ 18 | .I file 19 | ] 20 | .SH DESCRIPTION 21 | .TP 22 | null 23 | measures how long it takes to do 24 | .IR getppid (). 25 | We chose 26 | .IR getppid () 27 | because in all UNIX variants we are aware of, it requires a round-trip 28 | to/from kernel space and the actual work required inside the kernel is 29 | small and bounded. 30 | .TP 31 | read 32 | measures how long it takes to read one byte from \f(CB/dev/zero\fP. 33 | Note that some operating systems do not support \f(CB/dev/zero\fP. 34 | .TP 35 | write 36 | times how long it takes to write one byte to \f(CB/dev/null\fP. This 37 | is useful as a lower bound cost on anything that has to interact with 38 | the operating system. 39 | .TP 40 | stat 41 | measures how long it takes to 42 | .IR stat () 43 | a file whose inode is already cached. 44 | .TP 45 | fstat 46 | measures how long it takes to 47 | .IR fstat () 48 | an open file whose inode is already cached. 49 | .TP 50 | open 51 | measures how long it takes to 52 | .IR open () 53 | and then 54 | .IR close() 55 | a file. 56 | .SH OUTPUT 57 | Output format is 58 | .sp 59 | .ft CB 60 | Null syscall: 67 microseconds 61 | .ft 62 | .SH ACKNOWLEDGEMENT 63 | Funding for the development of 64 | this tool was provided by Sun Microsystems Computer Corporation. 65 | .SH "SEE ALSO" 66 | lmbench(8). 67 | .SH "AUTHOR" 68 | Carl Staelin and Larry McVoy 69 | .PP 70 | Comments, suggestions, and bug reports are always welcome. 71 | -------------------------------------------------------------------------------- /lmbench/doc/lat_tcp.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_TCP 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_tcp \- measure interprocess communication latency via TCP/IP 5 | .SH SYNOPSIS 6 | .B lat_tcp 7 | .I -s 8 | .sp .5 9 | .B lat_tcp 10 | [ 11 | .I "-m " 12 | ] 13 | [ 14 | .I "-P " 15 | ] 16 | [ 17 | .I "-W " 18 | ] 19 | [ 20 | .I "-N " 21 | ] 22 | .I hostname 23 | .sp .5 24 | .B lat_tcp 25 | .I "-S hostname" 26 | .SH DESCRIPTION 27 | .B lat_tcp 28 | is a client/server program that measures interprocess 29 | communication latencies. The benchmark passes a message back and forth between 30 | the two processes (this sort of benchmark is frequently referred to as a 31 | ``hot potato'' benchmark). No other work is done in the processes. 32 | .LP 33 | .B lat_tcp 34 | has three forms of usage: as a server (-s), as a client (lat_tcp localhost), and 35 | as a shutdown (lat_tcp -S localhost). 36 | .SH OUTPUT 37 | The reported time is in microseconds per round trip and includes the total 38 | time, i.e., the context switching overhead is includeded. 39 | Output format is like so 40 | .sp 41 | .ft CB 42 | TCP latency using localhost: 700 microseconds 43 | .ft 44 | .SH ACKNOWLEDGEMENT 45 | Funding for the development of 46 | this tool was provided by Sun Microsystems Computer Corporation. 47 | .SH "SEE ALSO" 48 | lmbench(8), lat_fcntl(8), lat_fifo(8), lat_tcp(8), lat_udp(8), lat_unix(8). 49 | .SH "AUTHOR" 50 | Carl Staelin and Larry McVoy 51 | .PP 52 | Comments, suggestions, and bug reports are always welcome. 53 | -------------------------------------------------------------------------------- /lmbench/doc/lat_tcp.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l c c 5 | l r r. 6 | System TCP \fBRPC/TCP\fP 7 | = 8 | DEC Alpha 485 788 9 | DEC Alpha 581 822 10 | Linux alpha 419 617 11 | DEC Alpha 629 994 12 | DEC Alpha 428 851 13 | DEC Alpha 267 371 14 | DEC Alpha 526 872 15 | DEC Alpha 412 673 16 | Linux i686 263 427 17 | Sun SC1000 855 1386 18 | DEC Alpha 826 1451 19 | Sun Ultra1 162 346 20 | Linux alpha 429 602 21 | Linux i586 1149 1434 22 | SunOS-5.4 sun4m 560 1196 23 | SunOS-5.4 sun4d 1006 1584 24 | SunOS-5.4 sun4m 826 1631 25 | SunOS-5.4 sun4m 335 784 26 | SunOS-5.4 sun4d 1211 1847 27 | Linux i586 467 713 28 | Linux i486 1592 2147 29 | FreeBSD/i586 264 450 30 | FreeBSD/i586 297 510 31 | IRIX5.3 IP22 278 641 32 | IRIX64-601 IP26 467 1018 33 | IRIX IP22 279 580 34 | Linux i586 477 718 35 | Linux i586 1196 1506 36 | Linux i586 1291 1668 37 | Linux i486 1465 2078 38 | IBM PowerPC 299 698 39 | FreeBSD/i586 312 548 40 | HP-UX 9000/735 222 707 41 | FreeBSD/i586 290 532 42 | HP-UX 9000/770 186 712 43 | FreeBSD/i586 295 535 44 | HP-UX 9000/819 393 668 45 | HP-UX 9000/735 257 805 46 | HP-UX 9000/755 262 812 47 | HP-UX 9000/735 245 800 48 | HP-UX 9000/897 286 854 49 | dgux mc88110 1381 1851 50 | IBM Power2 332 649 51 | IRIX64 IP25 482 806 52 | IRIX IP19 766 913 53 | IRIX64 IP21 643 974 54 | IRIX64 IP19 886 957 55 | HP-UX 9000/735 248 820 56 | IRIX64 IP19 546 900 57 | IRIX5.3 IP19 815 1006 58 | .TE 59 | .KE 60 | -------------------------------------------------------------------------------- /lmbench/doc/lat_udp.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_UDP 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_udp \- measure interprocess communication latency via UDP/IP 5 | .SH SYNOPSIS 6 | .B lat_udp 7 | .I -s 8 | .sp .5 9 | .B lat_udp 10 | [ 11 | .I "-m " 12 | ] 13 | [ 14 | .I "-P " 15 | ] 16 | [ 17 | .I "-W " 18 | ] 19 | [ 20 | .I "-N " 21 | ] 22 | .I hostname 23 | .sp .5 24 | .B lat_udp 25 | .I "-S hostname" 26 | .SH DESCRIPTION 27 | .B lat_udp 28 | is a client/server program that measures interprocess 29 | communication latencies. The benchmark passes a message back and forth between 30 | the two processes (this sort of benchmark is frequently referred to as a 31 | ``hot potato'' benchmark). No other work is done in the processes. 32 | .LP 33 | .B lat_udp 34 | has three forms of usage: as a server (-s), as a client (lat_udp localhost), and 35 | as a shutdown (lat_udp -S localhost). 36 | .SH OUTPUT 37 | The reported time is in microseconds per round trip and includes the total 38 | time, i.e., the context switching overhead is included. 39 | Output format is like so 40 | .sp 41 | .ft CB 42 | UDP latency using localhost: 650 microseconds 43 | .ft 44 | .SH ACKNOWLEDGEMENT 45 | Funding for the development of 46 | this tool was provided by Sun Microsystems Computer Corporation. 47 | .SH "SEE ALSO" 48 | lmbench(8), lat_fcntl(8), lat_fifo(8), lat_tcp(8), lat_unix(8). 49 | .SH "AUTHOR" 50 | Carl Staelin and Larry McVoy 51 | .PP 52 | Comments, suggestions, and bug reports are always welcome. 53 | -------------------------------------------------------------------------------- /lmbench/doc/lat_udp.tbl: -------------------------------------------------------------------------------- 1 | .KS 2 | .TS 3 | expand doublebox; 4 | l c c 5 | l r r. 6 | System UDP \fBRPC/UDP\fP 7 | = 8 | DEC Alpha 404 718 9 | Linux alpha 180 317 10 | Linux alpha 199 330 11 | DEC Alpha 259 358 12 | Linux i686 112 217 13 | Linux i486 368 770 14 | Linux i586 187 366 15 | Linux i586 276 538 16 | DEC Alpha 379 717 17 | DEC Alpha 676 765 18 | DEC Alpha 489 834 19 | Sun Ultra1 197 267 20 | Linux i586 281 552 21 | Linux i586 272 553 22 | SunOS-5.4 sun4m 414 622 23 | SunOS-5.4 sun4m 914 1290 24 | DEC Alpha 569 836 25 | Sun SC1000 739 1101 26 | SunOS-5.4 sun4m 590 935 27 | FreeBSD/i586 213 387 28 | FreeBSD/i586 249 408 29 | HP-UX 9000/819 413 655 30 | IRIX5.3 IP22 313 671 31 | IRIX64-601 IP26 474 1008 32 | IRIX IP22 261 562 33 | Linux i486 351 831 34 | DEC Alpha 709 1109 35 | SunOS-5.4 sun4d 1084 1430 36 | SunOS-5.4 sun4d 1180 1562 37 | IRIX IP19 796 903 38 | FreeBSD/i586 240 420 39 | IBM Power2 254 531 40 | IBM PowerPC 206 536 41 | FreeBSD/i586 265 459 42 | IRIX64 IP21 660 783 43 | dgux mc88110 1373 2175 44 | HP-UX 9000/897 289 673 45 | HP-UX 9000/770 185 657 46 | HP-UX 9000/735 244 742 47 | IRIX5.3 IP19 785 960 48 | IRIX64 IP25 486 740 49 | HP-UX 9000/735 248 759 50 | HP-UX 9000/735 246 768 51 | HP-UX 9000/735 252 786 52 | IRIX64 IP19 814 964 53 | HP-UX 9000/755 244 832 54 | IRIX64 IP19 678 893 55 | .TE 56 | .KE 57 | -------------------------------------------------------------------------------- /lmbench/doc/lat_unix.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_UNIX 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_unix \- measure interprocess communication latency via UNIX sockets 5 | .SH SYNOPSIS 6 | .B lat_unix 7 | [ 8 | .I "-m " 9 | ] 10 | [ 11 | .I "-P " 12 | ] 13 | [ 14 | .I "-W " 15 | ] 16 | [ 17 | .I "-N " 18 | ] 19 | .SH DESCRIPTION 20 | .B lat_unix 21 | is a client/server program that measures interprocess 22 | communication latencies. The benchmark passes a message back and forth between 23 | the two processes (this sort of benchmark is frequently referred to as a 24 | ``hot potato'' benchmark). No other work is done in the processes. 25 | .SH OUTPUT 26 | The reported time is in microseconds per round trip and includes the total 27 | time, i.e., the context switching overhead is includeded. 28 | Output format is like so 29 | .sp 30 | .ft CB 31 | AF_UNIX sock stream latency: 700 microseconds 32 | .ft 33 | .SH ACKNOWLEDGEMENT 34 | Funding for the development of 35 | this tool was provided by Sun Microsystems Computer Corporation. 36 | .SH "SEE ALSO" 37 | lmbench(8), lat_fcntl(8), lat_fifo(8), lat_tcp(8), lat_udp(8). 38 | .SH "AUTHOR" 39 | Carl Staelin and Larry McVoy 40 | .PP 41 | Comments, suggestions, and bug reports are always welcome. 42 | -------------------------------------------------------------------------------- /lmbench/doc/lat_unix_connect.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LAT_UNIX_CONNECT 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | lat_unix_connect \- measure interprocess connection latency via UNIX sockets 5 | .SH SYNOPSIS 6 | .B lat_unix_connect 7 | .I -s 8 | .sp .5 9 | .B lat_unix_connect 10 | [ 11 | .I "-P " 12 | ] 13 | [ 14 | .I "-W " 15 | ] 16 | [ 17 | .I "-N " 18 | ] 19 | .sp .5 20 | .B lat_unix_connect 21 | .I "-S" 22 | .SH DESCRIPTION 23 | .B lat_unix_connect 24 | is a client/server program that measures interprocess 25 | connection latencies. The benchmark times the creation and connection of 26 | an AF_UNIX socket to a local server. 27 | .LP 28 | .B lat_connect 29 | has three forms of usage: as a server (-s), as a client (lat_connect), 30 | and as a shutdown (lat_connect -S). 31 | .SH OUTPUT 32 | The reported time is in microseconds per connection. 33 | Output format is like so 34 | .sp 35 | .ft CB 36 | UNIX connection cost: 1006 microseconds 37 | .ft 38 | .SH "SEE ALSO" 39 | lmbench(8). 40 | .SH "AUTHOR" 41 | Carl Staelin and Larry McVoy 42 | .PP 43 | Comments, suggestions, and bug reports are always welcome. 44 | -------------------------------------------------------------------------------- /lmbench/doc/line.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH LINE 8 "$Date$" "(c)2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | line \- cache line size 5 | .SH SYNOPSIS 6 | .B line 7 | [ 8 | .I "-M " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .SH DESCRIPTION 17 | .B line 18 | tries to determine the cache line size in bytes of the largest cache 19 | which is smaller than 20 | .I len 21 | bytes. 22 | .LP 23 | .B line 24 | creates pointer chains which access the first word on each cache line 25 | on a page (randomly meandering through all the lines in a page before 26 | jumping to the next page). It measures the average memory latency 27 | for a variety of line sizes, starting with a line size of one word. 28 | When it finds an increase in the average latency that is significantly 29 | larger than the latency for the smaller line size then it assumes that 30 | it has found the line size. 31 | .LP 32 | This algorithm works because for line sizes less than the true line 33 | size, at least two 34 | .B line 35 | cache lines fit in the space of a true cache line. Since that cache 36 | line will be accessed twice, the first access will cause an expensive 37 | cache miss, while the second access will be a cache hit. Once the 38 | .B line 39 | cache line is equal to the true cache line size, then all accesses 40 | will cause cache misses. 41 | .SH BUGS 42 | .B line 43 | is an experimental benchmark, but it seems to work well on most 44 | systems. 45 | .SH "SEE ALSO" 46 | lmbench(8), tlb(8), cache(8), par_mem(8). 47 | .SH "AUTHOR" 48 | Carl Staelin and Larry McVoy 49 | .PP 50 | Comments, suggestions, and bug reports are always welcome. 51 | -------------------------------------------------------------------------------- /lmbench/doc/lmbench3_signals.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Inches 5 | Letter 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 225 1575 1050 2025 11 | 2 2 2 1 0 0 50 0 10 3.000 0 0 -1 0 0 5 12 | 225 1800 375 1800 375 1950 225 1950 225 1800 13 | 2 2 2 1 0 0 50 0 3 3.000 0 0 -1 0 0 5 14 | 225 1575 375 1575 375 1725 225 1725 225 1575 15 | 4 0 0 50 0 0 12 0.0000 4 180 600 450 1725 working\001 16 | 4 0 0 50 0 0 12 0.0000 4 180 465 450 1950 timing\001 17 | -6 18 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 19 | 2025 300 2025 1725 20 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 21 | 2250 300 2250 1575 22 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 23 | 1 1 1.00 60.00 120.00 24 | 750 525 2250 525 25 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 26 | 1 1 1.00 60.00 120.00 27 | 750 825 2250 825 28 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 29 | 1 1 1.00 60.00 120.00 30 | 1575 675 750 675 31 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 32 | 1 1 1.00 60.00 120.00 33 | 1800 975 750 975 34 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 35 | 1 1 1.00 60.00 120.00 36 | 750 1125 2250 1125 37 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 38 | 1800 300 1800 1875 39 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 40 | 1 1 1.00 60.00 120.00 41 | 3000 600 2250 600 42 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 43 | 1 1 1.00 60.00 120.00 44 | 1575 675 3000 675 45 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 46 | 1 1 1.00 60.00 120.00 47 | 3000 900 2250 900 48 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 49 | 1 1 1.00 60.00 120.00 50 | 1800 1200 3000 1200 51 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 52 | 1 1 1.00 60.00 120.00 53 | 3000 1275 2250 1275 54 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 55 | 1 1 1.00 60.00 120.00 56 | 2025 1350 3000 1350 57 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 58 | 1500 750 1650 600 59 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 60 | 1950 1425 2100 1275 61 | 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 62 | 1500 75 2325 75 2325 300 1500 300 1500 75 63 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 64 | 1575 300 1575 2025 65 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 66 | 1 1 1.00 60.00 120.00 67 | 2025 1350 750 1350 68 | 2 2 2 1 0 0 50 0 3 3.000 0 0 -1 0 0 5 69 | 150 525 750 525 750 975 150 975 150 525 70 | 2 2 2 1 0 0 50 0 10 3.000 0 0 -1 0 0 5 71 | 150 675 750 675 750 825 150 825 150 675 72 | 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 73 | 150 225 750 225 750 1350 150 1350 150 225 74 | 2 2 2 1 0 0 50 0 3 3.000 0 0 -1 0 0 5 75 | 3000 600 3600 600 3600 1200 3000 1200 3000 600 76 | 2 2 2 1 0 0 50 0 10 3.000 0 0 -1 0 0 5 77 | 3000 675 3600 675 3600 900 3000 900 3000 675 78 | 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 79 | 3000 225 3600 225 3600 1425 3000 1425 3000 225 80 | 4 0 0 50 0 0 12 0.0000 4 150 480 1650 225 parent\001 81 | 4 0 0 50 0 1 12 0.0000 4 180 420 900 525 ready\001 82 | 4 0 0 50 0 1 12 0.0000 4 135 360 900 825 done\001 83 | 4 0 0 50 0 1 12 0.0000 4 135 495 1200 975 results\001 84 | 4 0 0 50 0 1 12 0.0000 4 180 1020 825 1125 timing results\001 85 | 4 0 0 50 0 0 12 0.0000 4 135 450 3075 375 child1\001 86 | 4 0 0 50 0 1 12 0.0000 4 135 495 2325 1200 results\001 87 | 4 0 0 50 0 1 12 0.0000 4 180 420 2550 600 ready\001 88 | 4 0 0 50 0 1 12 0.0000 4 135 360 2550 900 done\001 89 | 4 0 0 50 0 1 12 0.0000 4 135 165 1350 675 go\001 90 | 4 0 0 50 0 1 12 0.0000 4 135 300 1275 1350 exit\001 91 | 4 0 0 50 0 0 12 0.0000 4 105 360 1650 2025 start\001 92 | 4 0 0 50 0 0 12 0.0000 4 135 690 2325 1575 response\001 93 | 4 0 0 50 0 0 12 0.0000 4 135 285 2100 1725 exit\001 94 | 4 0 0 50 0 0 12 0.0000 4 135 435 1875 1875 result\001 95 | 4 0 0 50 0 0 12 0.0000 4 135 450 225 375 child0\001 96 | -------------------------------------------------------------------------------- /lmbench/doc/memhier-color.d: -------------------------------------------------------------------------------- 1 | frame invis ht 1.5 wid 2.5 left solid bot solid 2 | label top "\fBalpha Linux 2.2.16-3\fR" down 0.3 3 | label bot "Size (MB)" 4 | label left "Latency (ns)" 5 | coord log log 6 | ticks bottom out at 0.000512 "512", 0.001024 "", 0.002048 "", 0.004096 "", 0.008192 "8K", 0.016384 "", 0.032768 "", 0.065536 "", 0.098304 "96K", 0.131072 "", 0.262144 "", 0.524288 "", 1.048576 "1M", 2.097152 "", 4.194304 "", 8.388608 "", 16.777216 "", 33.554432 "32M" 7 | draw dotted 8 | 0.000512 4.042 9 | 0.008192 4.046 10 | 0.010240 8.873 11 | 0.012288 12.085 12 | 0.016384 16.097 13 | 0.032768 16.103 14 | 0.065536 19.908 15 | 0.098304 20.622 16 | 0.114688 29.808 17 | 0.131072 37.724 18 | 0.196608 47.561 19 | 0.262144 52.134 20 | 0.524288 66.410 21 | 1.048576 74.897 22 | 1.310720 153.075 23 | 1.572864 198.678 24 | 2.097152 264.935 25 | 3.145728 333.862 26 | 4.194304 366.109 27 | 8.388608 370.522 28 | 33.554432 370.682 29 | "Colored" ljust at 1.572864, 222.789 30 | draw solid 31 | 0.000512 4.042 32 | 0.000640 4.043 33 | 0.000768 4.044 34 | 0.000896 4.043 35 | 0.001024 4.043 36 | 0.001280 4.044 37 | 0.001536 4.044 38 | 0.001792 4.044 39 | 0.002048 4.041 40 | 0.002560 4.044 41 | 0.003072 4.045 42 | 0.003584 4.044 43 | 0.004096 4.045 44 | 0.005120 4.046 45 | 0.006144 4.047 46 | 0.007168 4.048 47 | 0.008192 4.048 48 | 0.010240 8.872 49 | 0.012288 12.079 50 | 0.014336 14.379 51 | 0.016384 16.097 52 | 0.020480 16.104 53 | 0.024576 16.117 54 | 0.028672 16.114 55 | 0.032768 16.106 56 | 0.040960 16.110 57 | 0.049152 16.123 58 | 0.057344 18.062 59 | 0.065536 19.179 60 | 0.081920 97.039 61 | 0.098304 84.011 62 | 0.114688 81.764 63 | 0.131072 79.122 64 | 0.163840 82.634 65 | 0.196608 108.550 66 | 0.229376 104.530 67 | 0.262144 119.771 68 | 0.327680 111.317 69 | 0.393216 131.057 70 | 0.458752 143.902 71 | 0.524288 173.323 72 | 0.655360 197.268 73 | 0.786432 219.736 74 | 0.917504 224.743 75 | 1.048576 249.878 76 | 1.310720 287.157 77 | 1.572864 302.857 78 | 1.835008 315.170 79 | 2.097152 329.874 80 | 2.621440 347.418 81 | 3.145728 357.183 82 | 3.670016 362.297 83 | 4.194304 365.720 84 | 5.242880 369.345 85 | 33.554432 370.296 86 | "Malloc'ed" rjust at 0.458752, 219.736 87 | -------------------------------------------------------------------------------- /lmbench/doc/memhier-line.d: -------------------------------------------------------------------------------- 1 | frame invis ht 1.5 wid 2.5 left solid bot solid 2 | label top "\fBalpha Linux 2.2.16-3\fR" down 0.3 3 | label bot "Line Size (Bytes)" 4 | label left "Latency (ns)" 5 | coord log log 6 | ticks bottom out from 8 to 512 by *4 7 | ticks bottom out from 8 to 512 by *2 "" 8 | draw solid 9 | 8 7.247 10 | 16 10.909 11 | 32 16.788 12 | 64 17.083 13 | 128 16.272 14 | 256 16.721 15 | 512 16.129 16 | "L1" rjust above at 512, 16.129 17 | draw solid 18 | 8 22.853 19 | 16 41.496 20 | 32 78.712 21 | 64 141.658 22 | 128 139.119 23 | 256 138.446 24 | 512 137.902 25 | "L2" rjust above at 512, 137.902 26 | draw solid 27 | 8 51.529 28 | 16 98.915 29 | 32 193.614 30 | 64 372.230 31 | 128 371.689 32 | 256 371.486 33 | 512 371.486 34 | "L3" rjust above at 512, 371.486 35 | -------------------------------------------------------------------------------- /lmbench/doc/mhz.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH MHZ 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | mhz \- calulate processor clock rate 5 | .SH SYNOPSIS 6 | .B mhz 7 | .I [-c] 8 | .SH DESCRIPTION 9 | .B mhz 10 | calculates the processor clock rate and megahertz. It uses an 11 | unrolled, interlocked loop of adds or shifts. So far, superscalarness 12 | has been defeated on the tested processors (SuperSPARC, RIOS, Alpha). 13 | .SH OUTPUT 14 | Output format is either just the clock rate as a float (-c) or more verbose 15 | .sp 16 | .ft CB 17 | 39.80 Mhz, 25 nanosec clock 18 | .ft 19 | .LP 20 | .B mhz 21 | is described more completely in ``mhz: Anatomy of a microbenchmark'' 22 | in 23 | .I "Proceedings of 1998 USENIX Annual Technical Conference", June 1998. 24 | .SH "SEE ALSO" 25 | lmbench(8). 26 | .SH "AUTHOR" 27 | Carl Staelin and Larry McVoy 28 | .PP 29 | Comments, suggestions, and bug reports are always welcome. 30 | -------------------------------------------------------------------------------- /lmbench/doc/par_mem.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH PAR_MEM 8 "$Date$" "(c)2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | par_mem \- memory parallelism benchmark 5 | .SH SYNOPSIS 6 | .B par_mem 7 | [ 8 | .I "-L " 9 | ] 10 | [ 11 | .I "-M " 12 | ] 13 | [ 14 | .I "-W " 15 | ] 16 | [ 17 | .I "-N " 18 | ] 19 | .SH DESCRIPTION 20 | .B par_mem 21 | measures the available parallelism in the memory hierarchy, up to 22 | .I len 23 | bytes. Modern processors can often service multiple memory requests 24 | in parallel, while older processors typically blocked on LOAD 25 | instructions and had no available parallelism (other than that 26 | provided by cache prefetching). 27 | .B par_mem 28 | measures the available parallelism at a variety of points, since the 29 | available parallelism is often a function of the data location in the 30 | memory hierarchy. 31 | .LP 32 | In order to measure the available parallelism 33 | .B par_mem 34 | conducts a variety of experiments at each memory size; one for each 35 | level of parallelism. It builds a pointer chain of the desired 36 | length. It then creates an array of pointers which point to chain 37 | entries which are evenly spaced across the chain. Then it starts 38 | running the pointers forward through the chain in parallel. It can 39 | then measure the average memory latency for each level of parallelism, 40 | and the available parallelism is the minimum average memory latency 41 | for parallelism 1 divided by the average memory latency across all 42 | levels of available parallelism. 43 | .LP 44 | For example, the inner loop which measures parallelism 2 would look 45 | something like: 46 | .sp 47 | .ft CB 48 | for (i = 0; i < N; ++i) { 49 | p0 = (char **)*p0; 50 | p1 = (char **)*p1; 51 | } 52 | .ft 53 | .sp 54 | in a 55 | .I for 56 | loop (the overhead of the 57 | .I for 58 | loop is not significant; the loop is an unrolled loop 100 loads long). 59 | In this case, if the hardware can process two LOAD operations in parallel, 60 | then the overall latency of the loop should be equivalent to that of a 61 | single pointer chain, so the measured parallelism would be roughly two. 62 | If, however, the hardware can only process a single LOAD operation at 63 | once, or if there is (significant) resource contention between the two 64 | LOAD operations, then the loop will be much slower than a loop with a 65 | single pointer chain, so the measured parallelism will be less than 66 | two, and probably no smaller than one. 67 | .SH OUTPUT 68 | Output format is intended as input to \fBxgraph\fP or some similar program 69 | (we use a perl script that produces pic input). 70 | There is a set of data produced for each stride. The data set title 71 | is the stride size and the data points are the array size in megabytes 72 | (floating point value) and the load latency over all points in that array. 73 | .SH "SEE ALSO" 74 | lmbench(8), line(8), cache(8), tlb(8), par_ops(8). 75 | .SH "AUTHOR" 76 | Carl Staelin and Larry McVoy 77 | .PP 78 | Comments, suggestions, and bug reports are always welcome. 79 | -------------------------------------------------------------------------------- /lmbench/doc/par_ops.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH PAR_OPS 8 "$Date$" "(c)2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | par_ops \- basic CPU operation parallelism 5 | .SH SYNOPSIS 6 | .B par_ops 7 | [ 8 | .I "-W " 9 | ] 10 | [ 11 | .I "-N " 12 | ] 13 | .SH DESCRIPTION 14 | .B par_ops 15 | measures the available parallelism for basic CPU operations, such as 16 | integer ADD. Results are reported as the average operation latency 17 | divided by the minimum average operation latency across all levels of 18 | parallelism. 19 | .TP 20 | integer bit, add, mul, div, mod operations; 21 | maximum parallelism for integer XOR, ADD, MUL, DIV, MOD operations. 22 | .TP 23 | uint64 bit, add, mul, div, mod operations; 24 | maximum parallelism for uint64 XOR, ADD, MUL, DIV, MOD operations. 25 | .TP 26 | float add, mul, div operations; 27 | maximum parallelism for flot ADD, MUL, DIV operations. 28 | .TP 29 | double add, mul, div operations; 30 | maximum parallelism for flot ADD, MUL, DIV operations. 31 | .SH BUGS 32 | This benchmark is highly experimental and may sometimes (frequently?) 33 | give erroneous results. 34 | .SH "SEE ALSO" 35 | lmbench(8), lat_ops(8), par_mem(8). 36 | .SH "AUTHOR" 37 | Carl Staelin and Larry McVoy 38 | .PP 39 | Comments, suggestions, and bug reports are always welcome. 40 | -------------------------------------------------------------------------------- /lmbench/doc/refdbms.keys: -------------------------------------------------------------------------------- 1 | Chen93d 2 | Chen94a 3 | Fenwick95 4 | Howard88 5 | Jain91 6 | McCalpin95 7 | Ousterhout90 8 | Park90 9 | Smith82b 10 | Smith85 11 | Wolman89 12 | Wong88 13 | Agarwal95 14 | Bailey93 15 | Bitton83 16 | Chen91b 17 | Dietrich92 18 | Leutenegger93 19 | Nelson89 20 | TPPC92 21 | -------------------------------------------------------------------------------- /lmbench/doc/references.private: -------------------------------------------------------------------------------- 1 | %z Article 2 | %K McCalpin95 3 | %A John D. McCalpin 4 | %T Memory bandwidth and machine balance in current high performance computers 5 | %J IEEE Technical Committee on Computer Architecture newsletter 6 | %V to appear 7 | %D Dec. 1995 8 | -------------------------------------------------------------------------------- /lmbench/doc/reporting.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" @(#)lmbench.man 2.0 98/04/24 3 | .\" 4 | .\" lmbench - benchmarking toolbox 5 | .\" 6 | .\" Copyright (C) 1998 Carl Staelin and Larry McVoy 7 | .\" E-mail: staelin@hpl.hp.com 8 | .\" 9 | .TH "lmbench reporting" 3 "$Date:" "(c)1998-2000 Larry McVoy and Carl Staelin" "LMBENCH" 10 | .SH "NAME" 11 | milli, micro, nano, mb, kb \- the lmbench reporting subsystem 12 | .SH "SYNOPSIS" 13 | .B "#include ``lmbench.h''" 14 | .LP 15 | .B "void milli(char *s, uint64 n)" 16 | .LP 17 | .B "void micro(char *s, uint64 n)" 18 | .LP 19 | .B "void nano(char *s, uint64 n)" 20 | .LP 21 | .B "void mb(uint64 bytes)" 22 | .LP 23 | .B "void kb(uint64 bytes)" 24 | .SH "DESCRIPTION" 25 | Creating benchmarks using the 26 | .I lmbench 27 | timing harness is easy. 28 | Since it is so easy to measure performance using 29 | .IR lmbench , 30 | it is possible to quickly answer questions that arise during system 31 | design, development, or tuning. For example, image processing 32 | .LP 33 | There are two attributes that are critical for performance, latency 34 | and bandwidth, and 35 | .IR lmbench 's 36 | timing harness makes it easy to measure and report results for both. 37 | The measurement interface, 38 | .B benchmp 39 | is the same, but the reporting functions are different. 40 | Latency is usually important for frequently executed operations, and 41 | bandwidth is usually important when moving large chunks of data. 42 | .TP 43 | .B "void milli(char *s, uint64 n)" 44 | print out the time per operation in milli-seconds. 45 | .I n 46 | is the number of operations during the timing interval, which is passed 47 | as a parameter because each 48 | .I loop_body 49 | can contain several operations. 50 | .TP 51 | .B "void micro(char *s, uint64 n)" 52 | print the time per opertaion in micro-seconds. 53 | .TP 54 | .B "void nano(char *s, uint64 n)" 55 | print the time per operation in nano-seconds. 56 | .TP 57 | .B "void mb(uint64 bytes)" 58 | print the bandwidth in megabytes per second. 59 | .TP 60 | .B "void kb(uint64 bytes)" 61 | print the bandwidth in kilobytes per second. 62 | .SH "FUTURES" 63 | Development of 64 | .I lmbench 65 | is continuing. 66 | .SH "SEE ALSO" 67 | lmbench(8), lmbench(3), timing(3), results(3) 68 | .SH "AUTHOR" 69 | Carl Staelin and Larry McVoy 70 | .PP 71 | Comments, suggestions, and bug reports are always welcome. 72 | -------------------------------------------------------------------------------- /lmbench/doc/results.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" @(#)results.man 2.0 98/04/24 3 | .\" 4 | .\" results - lmbench results subsystem 5 | .\" 6 | .\" Copyright (C) 1998 Carl Staelin and Larry McVoy 7 | .\" E-mail: staelin@hpl.hp.com 8 | .\" 9 | .TH "lmbench result management" 3 "$Date:$" "(c)1998 Larry McVoy" "LMBENCH" 10 | .SH "NAME" 11 | insertinit, insertsort, get_results, set_results, save_median, save_minimum 12 | \- the lmbench results subsystem 13 | .SH "SYNOPSIS" 14 | .B "#include ``lmbench.h''" 15 | .LP 16 | .B "#define TRIES 11" 17 | .LP 18 | .B "typedef struct { uint64 u, n } value_t;" 19 | .LP 20 | .B "typedef struct { int N; value_t v[TRIES]; } result_t;" 21 | .LP 22 | .B "int sizeof_result(int N)" 23 | .LP 24 | .B "void insertinit(result_t *r)" 25 | .LP 26 | .B "void insertsort(uint64 u, uint64 n, result_t *r)" 27 | .LP 28 | .B "result_t* get_results()" 29 | .LP 30 | .B "void set_results(result_t *r)" 31 | .LP 32 | .B "void save_median()" 33 | .LP 34 | .B "void save_minimum()" 35 | .SH "DESCRIPTION" 36 | These routines provide some simple data management functionality. 37 | In most cases, you will not need these routines. 38 | .LP 39 | The current timing results can be accessed using the routines in 40 | timing(3). The current timing results may be modified using 41 | .B save_median 42 | and 43 | .BR save_minimum . 44 | .TP 45 | .B "int sizeof_result(int N)" 46 | returns the number of bytes to allocate for a result_t which contains 47 | .I N 48 | results. 49 | .TP 50 | .B "void insertinit(result_t *r)" 51 | initializes the results array. 52 | .TP 53 | .B "void insertsort(uint64 u, uint64 n, result_t *r)" 54 | insert 55 | .I u 56 | and 57 | .I n 58 | into 59 | .IR r . 60 | Results are sorted in decreasing order by 61 | .IR u/n . 62 | .TP 63 | .B "void get_results(result_t *r)" 64 | get a copy of the current results. 65 | .TP 66 | .B "void set_results(result_t *r)" 67 | save a copy 68 | .I r 69 | as the current results. 70 | .TP 71 | .B "void save_median()" 72 | sets the timing results to the median of the current results. 73 | .TP 74 | .B "void save_minimum()" 75 | sets the timing restuls to the minimum of the current results. 76 | .LP 77 | Results are sorted in ascending order, so the minimum value is at 78 | .B TRIES-1 79 | and the maximum value is at 80 | .BR 0 . 81 | .SH "FUTURES" 82 | Development of \fIlmbench\fR is continuing. 83 | .SH "SEE ALSO" 84 | lmbench(8), lmbench(3), reporting(3), results(3) 85 | .SH "AUTHOR" 86 | Carl Staelin and Larry McVoy 87 | .PP 88 | Comments, suggestions, and bug reports are always welcome. 89 | -------------------------------------------------------------------------------- /lmbench/doc/stream.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH stream 8 "$Date$" "(c)2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | stream \- John McCalpin's STREAM benchmark 5 | .SH SYNOPSIS 6 | .B stream 7 | [ 8 | .I "-M " 9 | ] 10 | [ 11 | .I "-W " 12 | ] 13 | [ 14 | .I "-N " 15 | ] 16 | .SH DESCRIPTION 17 | .B stream 18 | mimics John McCalpin's STREAM benchmark. It measures memory bandwidth. 19 | .SH BUGS 20 | .B stream 21 | is an experimental benchmark, but it seems to work well on most 22 | systems. 23 | .SH "SEE ALSO" 24 | lmbench(8), bw_mem(8), line(8), tlb(8), cache(8), par_mem(8). 25 | .SH "AUTHOR" 26 | Carl Staelin and Larry McVoy 27 | .PP 28 | Comments, suggestions, and bug reports are always welcome. 29 | -------------------------------------------------------------------------------- /lmbench/doc/tlb.8: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH TLB 8 "$Date$" "(c)2000 Carl Staelin and Larry McVoy" "LMBENCH" 3 | .SH NAME 4 | tlb \- TLB size and latency benchmark 5 | .SH SYNOPSIS 6 | .B tlb 7 | [ 8 | .I "-L " 9 | ] 10 | [ 11 | .I "-M " 12 | ] 13 | [ 14 | .I "-W " 15 | ] 16 | [ 17 | .I "-N " 18 | ] 19 | .SH DESCRIPTION 20 | .B tlb 21 | tries to determine the size, in pages, of the TLB. 22 | The largest amount of memory it will examine is 23 | .I len 24 | bytes. 25 | .LP 26 | .B tlb 27 | compares the memory latency for two different pointer chains. 28 | The two chains occupy the same amount of cache space, but they stress 29 | the memory subsystem differently. The first chain accesses one word 30 | per page, while the second chain 31 | randomly jumps through all the lines on a page before jumping to the 32 | next page. When all of the pointers reside in the cache (which is the 33 | usual case), and all of the pages for the first chain reside in the 34 | TLB, then the average memory latencies should be identical. Assuming 35 | there is a fixed size TLB, then at some point the number of pages 36 | accessed by the first page will be larger than the TLB. At this point 37 | the average latency for each memory access for the first chain will be 38 | a cache hit plus some fraction of a TLB miss. 39 | .LP 40 | Once the TLB boundary is located 41 | .B tlb 42 | reports the TLB miss latency as the TLB latency for twice as many 43 | pages as the TLB can hold. 44 | .SH BUGS 45 | .B tlb 46 | is an experimental benchmark, but it seems to work well on most 47 | systems. However, if a processor has a TLB hierarchy 48 | .B tlb 49 | only finds the top level TLB. 50 | .SH "SEE ALSO" 51 | lmbench(8), line(8), cache(8), par_mem(8). 52 | .SH "AUTHOR" 53 | Carl Staelin and Larry McVoy 54 | .PP 55 | Comments, suggestions, and bug reports are always welcome. 56 | -------------------------------------------------------------------------------- /lmbench/results/percent.errs: -------------------------------------------------------------------------------- 1 | Name "main::files" used only once: possible typo at ../scripts/getpercent line 14. 2 | Name "main::lat_tlb" used only once: possible typo at ../scripts/getpercent line 157. 3 | Name "main::bw_file" used only once: possible typo at ../scripts/getpercent line 91. 4 | -------------------------------------------------------------------------------- /lmbench/results/summary.errs: -------------------------------------------------------------------------------- 1 | arm-result: no data for Socket bandwidth using localhost 2 | arm-result: no data for Socket bandwidth using localhost 3 | arm-result: no data for Socket bandwidth using localhost 4 | arm-result: no data for Socket bandwidth using localhost 5 | arm-result: no data for Socket bandwidth using localhost 6 | -------------------------------------------------------------------------------- /lmbench/scripts/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for lmbench scripts subdir. 2 | #$Id$ 3 | 4 | get: 5 | get -s 6 | 7 | clean: 8 | -------------------------------------------------------------------------------- /lmbench/scripts/README: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | This directory contains scripts used to generate or post process lmbench 4 | output. You probably do not want to be here or run these by hand, the 5 | Makefiles in ../src and ../results invoke these. There are some useful 6 | scripts here, however, in particular the graphing scripts. If you are 7 | interested in groff graphing tools, check out ../doc/*graph.1. 8 | -------------------------------------------------------------------------------- /lmbench/scripts/TODO: -------------------------------------------------------------------------------- 1 | Make graph take a %T and %T2 and put %T above %T2 2 | 3 | Or make it take \n in the title and deal. 4 | -------------------------------------------------------------------------------- /lmbench/scripts/allctx: -------------------------------------------------------------------------------- 1 | 2 | # Extract the context switching information from lmbench result files. 3 | # Usage: getctx file file.... 4 | # 5 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 6 | # Copyright (c) 1994 Larry McVoy. GPLed software. 7 | # $Id$ 8 | eval 'exec perl -Ss $0 "$@"' 9 | if 0; 10 | 11 | $first = 1; 12 | foreach $file (@ARGV) { 13 | open(FD, $file); 14 | $file =~ s|.*/||; 15 | $file =~ s/\.\d+//; 16 | while () { 17 | chop; 18 | if (/^\[lmbench/) { 19 | @_ = split; 20 | if ($_[3] eq "SunOS") { 21 | $_[3] .= "-$_[5]"; 22 | } 23 | $uname = "@_"; 24 | } 25 | if (/Mhz/) { 26 | $mhz = $_; 27 | } 28 | if (/^.size=/) { 29 | s/size/Process size/; 30 | s/ ovr/\toverhead/; 31 | @info = &getinfo($uname, $mhz); 32 | ($f = $file) =~ s|.*/||; 33 | print "\n" unless $first; 34 | $first = 0; 35 | print "%T $info[3] $info[$#info]Mhz\n"; 36 | print "$_\n"; 37 | while () { 38 | last if /^Null/ || /^Pipe/ || /^Memor/; 39 | next if /\$Id/; 40 | s/ ovr/\toverhead/; 41 | s/size/Process size/; 42 | print ; 43 | } 44 | last; 45 | } 46 | } 47 | } 48 | exit 0; 49 | 50 | # Try and create sensible names from uname -a output 51 | sub getinfo 52 | { 53 | local(@info); 54 | local($name); 55 | local($mhz) = sprintf("%.0f", $_[1]); 56 | 57 | @info = split(/\s+/, $_[0]); 58 | $name = pop(@info); 59 | chop($name); 60 | if ($name eq "mips") { 61 | $name = "$info[$#info]@$mhz"; 62 | } elsif ($_[0] =~ /HP-UX/) { 63 | $name = "$info[7]@$mhz"; 64 | } elsif ($_[0] =~ /SunOS/) { 65 | $name = "$info[7]@$mhz"; 66 | } else { 67 | $name .= "@$mhz"; 68 | } 69 | push(@info, $name); 70 | @info; 71 | } 72 | -------------------------------------------------------------------------------- /lmbench/scripts/allmem: -------------------------------------------------------------------------------- 1 | 2 | # Extract the memory latency graph data from lmbench result files. 3 | # 4 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 5 | # Copyright (c) 1994 Larry McVoy. GPLed software. 6 | # $Id$ 7 | eval 'exec perl -Ss $0 "$@"' 8 | if 0; 9 | 10 | # Uses a stride of 128 11 | #print "\"%X Array size\n\"%Y Latency in nanoseconds\n"; 12 | foreach $file (@ARGV) { 13 | open(FD, $file); 14 | $file =~ s|.*/||; 15 | while () { 16 | chop; 17 | if (/^\[lmbench/) { 18 | @_ = split; 19 | if ($_[3] eq "SunOS") { 20 | $_[3] .= "-$_[5]"; 21 | } 22 | $uname = "@_"; 23 | } 24 | if (/Mhz/) { 25 | $mhz = $_; 26 | } 27 | if (/^Memory load latency/) { 28 | @info = &getinfo($uname, $mhz); 29 | ($f = $file) =~ s|.*/||; 30 | print "\"$file $info[3] $info[$#info]\n"; 31 | while () { 32 | next unless /^"stride=128/; 33 | last; 34 | } 35 | while () { 36 | if (/^\s*$/) { 37 | print "\n"; 38 | last; 39 | } 40 | print; 41 | } 42 | last; 43 | } 44 | } 45 | } 46 | exit 0; 47 | 48 | # Try and create sensible names from uname -a output 49 | sub getinfo 50 | { 51 | local(@info); 52 | local($name); 53 | local($mhz) = sprintf("%.0f", $_[1]); 54 | 55 | @info = split(/\s+/, $_[0]); 56 | $name = pop(@info); 57 | chop($name); 58 | if ($name eq "mips") { 59 | $name = "$info[$#info]@$mhz"; 60 | } elsif ($_[0] =~ /HP-UX/) { 61 | $name = "$info[7]@$mhz"; 62 | } elsif ($_[0] =~ /SunOS/) { 63 | $name = "$info[7]@$mhz"; 64 | } else { 65 | $name .= "@$mhz"; 66 | } 67 | push(@info, $name); 68 | @info; 69 | } 70 | -------------------------------------------------------------------------------- /lmbench/scripts/bghtml: -------------------------------------------------------------------------------- 1 | 2 | # Make HTML files that will point to the right GIF files. 3 | # Usage: bghtml file file file.... 4 | # 5 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 6 | # Copyright (c) 1995 Larry McVoy. GPLed software. 7 | # $Id$ 8 | eval 'exec perl -Ss $0 "$@"' 9 | if 0; 10 | 11 | $bar = 0; 12 | for ($i = 0; $i <= $#ARGV; ++$i) { 13 | $file = $ARGV[$i]; $file =~ s|tmp/||; $file =~ s|.bg$||; 14 | if ($i > 0) { 15 | $prev = $ARGV[$i - 1]; 16 | $prev =~ s|tmp/||; 17 | $prev =~ s|.bg$||; 18 | $prev_html = "${prev}.html"; 19 | } 20 | if ($i < $#ARGV) { 21 | $next = $ARGV[$i + 1]; 22 | $next =~ s|tmp/||; 23 | $next =~ s|.bg$||; 24 | $next_html = "${next}.html"; 25 | } 26 | $name = "HTML/${file}.html"; 27 | open(F, ">$name"); 28 | print F "Man page for this benchmark

\n"; 29 | $str = sprintf("\n", ++$bar); 30 | print F "$str

"; 31 | print F "\n"; 32 | print F "\n"; 33 | print F "\n" 34 | if $i > 0; 35 | print F "\n" 36 | if $i < $#ARGV; 37 | close(F); 38 | } 39 | exit 0; 40 | -------------------------------------------------------------------------------- /lmbench/scripts/compiler: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "X$CC" != "X" ] && echo "$CC" | grep '`' > /dev/null 4 | then 5 | CC= 6 | fi 7 | 8 | if [ X$CC = X ] 9 | then CC=cc 10 | for p in `echo $PATH | sed 's/:/ /g'` 11 | do if [ -f $p/gcc ] 12 | then CC=gcc 13 | fi 14 | done 15 | fi 16 | #CC=/home/tonyho/renesas/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-gcc 17 | CC=/work/SmartAuto/prebuilt/toolchains/arm-fsl-linux-gnueabi/4.6.2/bin/arm-fsl-linux-gnueabi-gcc 18 | echo $CC 19 | -------------------------------------------------------------------------------- /lmbench/scripts/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | UNAME=`uname -n 2>/dev/null` 4 | if [ X$UNAME = X ] 5 | then echo CONFIG 6 | else echo CONFIG.$UNAME 7 | fi 8 | -------------------------------------------------------------------------------- /lmbench/scripts/depend: -------------------------------------------------------------------------------- 1 | 2 | # Figure out dependencies for lmbench src. 3 | # 4 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 5 | # Copyright (c) 1994 Larry McVoy. GPLed software. 6 | # $Id$ 7 | eval 'exec perl -Ssw $0 "$@"' 8 | if 0; 9 | 10 | open(M, "Makefile"); 11 | while() { 12 | push(@Makefile, $_); 13 | last if /^..MAKEDEPEND/; 14 | } 15 | close(M); 16 | open(G, "gcc -MM *.c | grep -v mhz.c | grep -v lat_ctx.c|"); 17 | while () { 18 | @_ = chop; 19 | @_ = split(/:/); 20 | $_[0] =~ s/\.o\s*$//; 21 | push(@Makefile, "\$O/$_[0]: $_[1] \$O/lmbench.a\n"); 22 | push(@Makefile, "\t\$(COMPILE) -o \$O/$_[0] $_[0].c \$O/lmbench.a \$(LDLIBS)\n\n"); 23 | } 24 | system "mv Makefile Makefile.old"; 25 | open(M, ">Makefile"); 26 | print M @Makefile; 27 | close(M); 28 | exit 0; 29 | -------------------------------------------------------------------------------- /lmbench/scripts/do_ctx: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Make sure we can find: ./cmd, df, and netstat 4 | PATH=.:$PATH:/etc:/usr/etc:/sbin:/usr/sbin 5 | export PATH 6 | 7 | if [ X$MB = X ] 8 | then MB=8 9 | fi 10 | AVAILKB=`expr $MB \* 1024` 11 | 12 | # Figure out how big we can go for stuff that wants to use 13 | # all and half of memory. 14 | HALF="512 1k 2k 4k 8k 16k 32k 64k 128k 256k 512k 1m" 15 | ALL="$HALF 2m" 16 | i=4 17 | while [ $i -le $MB ] 18 | do 19 | ALL="$ALL ${i}m" 20 | h=`expr $i / 2` 21 | HALF="$HALF ${h}m" 22 | i=`expr $i \* 2` 23 | done 24 | 25 | msleep 250 26 | if [ "X$CTX" = X ] 27 | then CTX="0 4 8 16 32 64" 28 | fi 29 | if [ "X$N" = X ] 30 | then N="2 4 8 16 24 32 64 96" 31 | fi 32 | for size in $CTX 33 | do lat_ctx -s $size $N 34 | done 35 | exit 0 36 | -------------------------------------------------------------------------------- /lmbench/scripts/getctx: -------------------------------------------------------------------------------- 1 | 2 | # Extract the context switching information from lmbench result files. 3 | # Usage: getctx file file.... 4 | # 5 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 6 | # Copyright (c) 1994 Larry McVoy. GPLed software. 7 | # $Id$ 8 | eval 'exec perl -Ss $0 "$@"' 9 | if 0; 10 | 11 | $title = "foo" if 0; 12 | 13 | foreach $file (@ARGV) { 14 | open(FD, $file); 15 | while () { 16 | chop; 17 | if (/^\[lmbench/) { 18 | @_ = split; 19 | if ($_[3] eq "SunOS") { 20 | $_[3] .= "-$_[5]"; 21 | } 22 | $uname = "@_"; 23 | } 24 | if (/Mhz/) { 25 | $mhz = $_; 26 | } 27 | if (/^.size=/) { 28 | s/size/Process size/; 29 | s/ ovr/\toverhead/; 30 | @info = &getinfo($uname, $mhz); 31 | ($f = $file) =~ s|/|-|; 32 | print "tmp/ctx.$f\n"; 33 | open(OUT, ">tmp/ctx.$f"); 34 | print OUT "\"%X Processes \n\"%Y Time in microseconds\n"; 35 | if ($title) { 36 | print OUT "%T $f\n"; 37 | } else { 38 | print OUT 39 | "\"%T Context switches for " . 40 | "$info[3] $info[$#info]Mhz\n"; 41 | } 42 | print OUT "$_\n"; 43 | while () { 44 | last if /^Null/ || /^Pipe/ || /^Memor/ || /^tlb:/; 45 | next if /\$Id/; 46 | next if m|scripts/lmbench: /dev/tty|; 47 | s/ ovr/\toverhead/; 48 | s/size/Process size/; 49 | print OUT; 50 | } 51 | close(OUT); 52 | last; 53 | } 54 | } 55 | } 56 | 57 | # Try and create sensible names from uname -a output 58 | sub getinfo 59 | { 60 | local(@info); 61 | local($name); 62 | local($mhz); 63 | 64 | ($mhz = $_[1]) =~ s/[\. ].*//; 65 | @info = split(/\s+/, $_[0]); 66 | $name = pop(@info); 67 | chop($name); 68 | if ($name eq "mips") { 69 | $name = "$info[$#info]@$mhz"; 70 | } elsif ($_[0] =~ /HP-UX/) { 71 | $name = "$info[7]@$mhz"; 72 | } elsif ($_[0] =~ /SunOS/) { 73 | $name = "$info[7]@$mhz"; 74 | } else { 75 | $name .= "@$mhz"; 76 | } 77 | push(@info, $name); 78 | @info; 79 | } 80 | -------------------------------------------------------------------------------- /lmbench/scripts/getdisk: -------------------------------------------------------------------------------- 1 | 2 | # Extract the disk graph data from lmbench result files. 3 | # 4 | # Hacked into existence by Larry McVoy 5 | # Copyright (c) 1994 Larry McVoy. GPLed software. 6 | # $Id$ 7 | eval 'exec perl -Ssw $0 "$@"' 8 | if 0; 9 | 10 | foreach $file (@ARGV) { 11 | open(FD, $file); 12 | $file =~ s|/|-|; 13 | while () { 14 | next unless /DISK_DESC/; 15 | s/.DISK_DESC: //; 16 | chop; chop; chop; 17 | @_ = split(/[\[\]]/, $_); 18 | foreach $_ (@_) { 19 | next unless /:/; 20 | @foo = split(/:/, $_); 21 | $foo[0] =~ s|/dev/||; 22 | $disks{$foo[0]} = $foo[1]; 23 | } 24 | last; 25 | } 26 | while () { 27 | if (/^"Seek times for \/dev\/(.*)$/) { 28 | $ok = 0; 29 | foreach $key (keys %disks) { 30 | next unless $key eq $1; 31 | $ok = 1; 32 | } 33 | if ($ok != 1) { 34 | die "Disk results are screwed up, no $1.\n"; 35 | } 36 | print "tmp/seek_$1.$file\n"; 37 | open(OUT, ">tmp/seek_$1.$file"); 38 | print OUT "%T Seek times for $disks{$1}\n"; 39 | print OUT "%X Seek distance (MB)\n"; 40 | print OUT "%Y Time in millisec\n"; 41 | while () { 42 | last unless /^\d/; 43 | print OUT; 44 | } 45 | close(OUT); 46 | } 47 | if (/^"Zone bandwidth for \/dev\/(.*)$/) { 48 | $ok = 0; 49 | foreach $key (keys %disks) { 50 | next unless $key eq $1; 51 | $ok = 1; 52 | } 53 | if ($ok != 1) { 54 | die "Disk results are screwed up, no $1.\n"; 55 | } 56 | print "tmp/zone_$1.$file\n"; 57 | open(OUT, ">tmp/zone_$1.$file"); 58 | print OUT "%T Zone bandwidths for $disks{$1}\n"; 59 | print OUT "%X Disk offset (MB)\n"; 60 | print OUT "%Y Bandwidth (MB/sec)\n"; 61 | while () { 62 | last unless /^\d/; 63 | print OUT; 64 | } 65 | close(OUT); 66 | } 67 | } 68 | } 69 | exit 0; 70 | -------------------------------------------------------------------------------- /lmbench/scripts/getlist: -------------------------------------------------------------------------------- 1 | # Find everything in my results directory that looks like lmbench output. 2 | # 3 | # Hacked into existence by Larry McVoy (lm@bitmover.com) 4 | # Copyright (c) 1994-1998 Larry McVoy. 5 | # $Id$ 6 | eval 'exec perl -Ssw $0 "$@"' 7 | if 0; 8 | 9 | $LIST = "no such file"; 10 | $LIST = "LIST" if (-f "LIST"); 11 | $LIST = $ARGV[0] if (($#ARGV == 0) && (-f $ARGV[0])); 12 | if (-f $LIST) { 13 | open(L, $LIST); 14 | $_ = ; 15 | chop; 16 | @files = split; 17 | close(L); 18 | } else { 19 | @files = <*/*>; 20 | } 21 | foreach $file (@files) { 22 | next if $file =~ /\.INFO$/; 23 | open(FD, $file) || next; 24 | next unless defined($_ = ); 25 | close(FD); 26 | next unless /^\[lmbench3.[01]/; 27 | print "$file "; 28 | } 29 | print "\n"; 30 | exit 0; 31 | -------------------------------------------------------------------------------- /lmbench/scripts/getmax: -------------------------------------------------------------------------------- 1 | 2 | # Look at a bunch of bargraph files and figure out the max amongst them all. 3 | # Usage: getmax file file file.... 4 | # 5 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 6 | # Copyright (c) 1994 Larry McVoy. GPLed software. 7 | # $Id$ 8 | 9 | eval 'exec perl -Ssw $0 "$@"' 10 | if 0; 11 | 12 | $graph = 1 if 0; 13 | $exit = 1; 14 | foreach $file (@ARGV) { 15 | $exit = 0 if -f $file; 16 | } 17 | exit $exit if $noop; 18 | 19 | $noop = 1 if 0; 20 | $max_X = $max_Y = -1000000000; 21 | $min_X = $min_Y = 1000000000; 22 | foreach $file (@ARGV) { 23 | next if $rmmax; 24 | unless (open(FD, $file)) { 25 | warn "Can't open $file\n"; 26 | next; 27 | } 28 | while () { 29 | next if /^"/; 30 | next if /^%/; 31 | next if /^\s*$/; 32 | next if m|scripts/lmbench: /dev/tty|; 33 | @_ = split; 34 | $min_X = $_[0] if ($_[0] < $min_X); 35 | $min_Y = $_[1] if ($_[1] < $min_Y); 36 | $max_X = $_[0] if ($_[0] > $max_X); 37 | $max_Y = $_[1] if ($_[1] > $max_Y); 38 | } 39 | close(FD); 40 | } 41 | $half = 0 if 0; # lint 42 | $max_X /= 2 if ($half); 43 | foreach $file (@ARGV) { 44 | unless (open(FD, $file)) { 45 | warn "Can't open $file\n"; 46 | next; 47 | } 48 | @lines = ; 49 | open(FD, ">$file") || die "Can't open $file\n"; 50 | if ($graph) { 51 | print FD "%fakemin-X $min_X\n"; 52 | print FD "%fakemin-Y $min_Y\n"; 53 | print FD "%fakemax-X $max_X\n"; 54 | print FD "%fakemax-Y $max_Y\n"; 55 | foreach $_ (@lines) { 56 | next if /^%fakem/; 57 | print FD; 58 | } 59 | warn "Max X is $max_X\n" if $v; 60 | warn "Max Y is $max_Y\n" if $v; 61 | } elsif ($rmmax) { 62 | foreach $_ (@lines) { 63 | next if /^%fakem/; 64 | print FD; 65 | } 66 | } else { 67 | print FD @lines; 68 | print FD "%fakemax $max_X\n"; 69 | warn "Max X is $max_X\n" if $v; 70 | } 71 | close(FD); 72 | } 73 | exit $exit; 74 | -------------------------------------------------------------------------------- /lmbench/scripts/getmem: -------------------------------------------------------------------------------- 1 | 2 | # Extract the memory latency graph data from lmbench result files. 3 | # 4 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 5 | # Copyright (c) 1994 Larry McVoy. GPLed software. 6 | # $Id$ 7 | eval 'exec perl -Ss $0 "$@"' 8 | if 0; 9 | 10 | foreach $file (@ARGV) { 11 | open(FD, $file); 12 | $file =~ s|/|-|; 13 | while () { 14 | chop; 15 | next if m|scripts/lmbench: /dev/tty|; 16 | if (/^\[lmbench/) { 17 | @_ = split; 18 | if ($_[3] eq "SunOS") { 19 | $_[3] .= "-$_[5]"; 20 | } 21 | $uname = "@_"; 22 | } 23 | if (/Mhz/) { 24 | $mhz = $_; 25 | } 26 | if (/^Memory load latency/) { 27 | @info = &getinfo($uname, $mhz); 28 | ($f = $file) =~ s|.*/||; 29 | print "tmp/mem.$f\n"; 30 | open(OUT, ">tmp/mem.$f"); 31 | print OUT "\"%X Array size\n\"%Y Latency in nanoseconds\n"; 32 | print OUT 33 | "\"%T $file $info[3] $info[$#info] memory latencies\n"; 34 | while () { 35 | next if /\$Id/; 36 | next if /^\[/; 37 | last if /^Random load latency/; 38 | print OUT; 39 | } 40 | close(OUT); 41 | last; 42 | } 43 | } 44 | } 45 | exit 0; 46 | 47 | # Try and create sensible names from uname -a output 48 | sub getinfo 49 | { 50 | local(@info); 51 | local($name); 52 | local($mhz) = $_[1]; 53 | 54 | $mhz =~ s/\..*//; 55 | $mhz =~ s/ .*//; 56 | @info = split(/\s+/, $_[0]); 57 | $name = pop(@info); 58 | chop($name); 59 | if ($name eq "mips") { 60 | $name = "$info[$#info]@$mhz"; 61 | } elsif ($_[0] =~ /HP-UX/) { 62 | $name = "$info[7]@$mhz"; 63 | } elsif ($_[0] =~ /SunOS/) { 64 | $name = "$info[7]@$mhz"; 65 | } else { 66 | $name .= "@$mhz"; 67 | } 68 | push(@info, $name); 69 | @info; 70 | } 71 | -------------------------------------------------------------------------------- /lmbench/scripts/getresults: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -ws 2 | 3 | # Search through the archives splitting out stuff that has pathnames. 4 | 5 | while (1) { 6 | &headers; 7 | &body; 8 | } 9 | 10 | sub headers 11 | { 12 | while (<>) { 13 | warn "HDR $_" if ($debug); 14 | return if /^\s*$/; 15 | } 16 | exit; 17 | } 18 | 19 | # Save the info for the system, skipping everything ig there is no info. 20 | sub body 21 | { 22 | @info = (); 23 | while (<>) { 24 | last if m|^[-]+ \.\./results|; 25 | last if /^\[lmbench/; 26 | if (/^From[: ]/) { warn "FROM $_"; return; } 27 | warn "INFO $_" if ($debug); 28 | push(@info, $_); 29 | } 30 | if (/^[-]+ \.\.\/results/) { 31 | @foo = split; 32 | $path = $foo[1]; 33 | $path =~ s|\.\./||; 34 | warn "PATH $path\n" if ($debug); 35 | &results; 36 | return; 37 | } 38 | warn "SKIPPING one\n"; 39 | while (<>) { 40 | warn "SKIP $_" if ($SKIP); 41 | last if /^Memory load latency/; 42 | if (/^From[: ]/) { warn "FROM $_"; return; } 43 | } 44 | die "No memory load latency" unless /^Memory load latency/; 45 | while (<>) { 46 | warn "SKIP $_" if ($SKIP); 47 | last if /^\[/; 48 | if (/^From[: ]/) { warn "FROM $_"; return; } 49 | } 50 | die "No date" unless /^\[/; 51 | while (<>) { 52 | last unless /^\s*$/; 53 | if (/^From[: ]/) { warn "FROM $_"; return; } 54 | } 55 | } 56 | 57 | sub results 58 | { 59 | @results = (); 60 | while (<>) { 61 | goto done if (/^From[: ]/); 62 | warn "RES $_" if ($RES); 63 | push(@results, $_); 64 | last if /^Memory load latency/; 65 | } 66 | die "No memory load latency" unless /^Memory load latency/; 67 | while (<>) { 68 | goto done if (/^From[: ]/); 69 | warn "RES $_" if ($RES); 70 | push(@results, $_); 71 | last if /^\[/; 72 | } 73 | die "No date" unless /^\[/; 74 | while (<>) { 75 | last unless /^\s*$/; 76 | } 77 | 78 | done: 79 | ($dir = $path) =~ s|/[^/]+$||; 80 | warn "DIR $dir\n" if ($debug); 81 | system "mkdir -p $dir"; 82 | if (-e $path) { 83 | warn "CONFLICT on $path\n" if $debug; 84 | for ($i = 0; ; $i++) { 85 | $tmp = "${path}.${i}"; 86 | last if ! -e $tmp; 87 | warn "CONFLICT on $tmp\n" if $debug; 88 | } 89 | $path = $tmp; 90 | } 91 | $info = $path . ".INFO"; 92 | open(O, ">$info"); 93 | print O @info; 94 | close(O); 95 | warn "Saving $path\n" if $verbose; 96 | open(O, ">$path"); 97 | print O @results; 98 | close(O); 99 | } 100 | -------------------------------------------------------------------------------- /lmbench/scripts/gifs: -------------------------------------------------------------------------------- 1 | 2 | # Make HTML files that will point to the right GIF files. 3 | # Usage: bghtml file file file.... 4 | # 5 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 6 | # Copyright (c) 1995 Larry McVoy. GPLed software. 7 | # $Id$ 8 | eval 'exec perl -Ssw $0 "$@"' 9 | if 0; 10 | 11 | &pbm; 12 | exit 0; 13 | 14 | sub pbm 15 | { 16 | @ctx = ; pop(@ctx); 17 | @mem = ; pop(@mem); 18 | @bar = ; pop(@bar); 19 | 20 | foreach $i () { 21 | ($out = $i) =~ s/.pbm//; 22 | warn "Bitmap munging $out\n"; 23 | #system "pnmcrop < $i | ppmtogif -transparent 1,1,1 > $out"; 24 | system " 25 | pnmcrop < $i > HTML/___tmp 2>/dev/null 26 | set `pnmfile HTML/___tmp` 27 | newx=`expr \$4 - 2` 28 | newy=`expr \$6 - 2` 29 | pnmcut 1 1 \$newx \$newy < HTML/___tmp > HTML/___tmp.pnm 30 | convert -mattecolor slategrey -frame 15x15+0+6 HTML/___tmp.pnm HTML/___tmp.ppm 31 | ppmtogif < HTML/___tmp.ppm > $out.gif 2>/dev/null"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lmbench/scripts/html-man: -------------------------------------------------------------------------------- 1 | eval 'exec perl -Ssw $0 "$@"' 2 | if 0; 3 | 4 | # Take a man tree and make an html tree out of it 5 | # 6 | # Derived from Donners man2html script 7 | 8 | from=/usr/man 9 | to=/u/eo/repository/system/unix/man 10 | 11 | function disambiguate 12 | { 13 | newbase=${1} 14 | newname="${newbase}.1" 15 | dis=2 16 | while [ -a "${newname}" ] 17 | do 18 | newname=$newbase"."$dis 19 | dis=$(expr $dis + 1) 20 | done 21 | } 22 | 23 | while ($ARGV[0] =~ /^-/) { 24 | if ($ARGV[0] eq "-f") { 25 | shift(@ARGV); 26 | $from = shift(@ARGV); 27 | } 28 | if ($ARGV[0] eq "-t") { 29 | shift(@ARGV); 30 | $to = shift(@ARGV); 31 | } 32 | } 33 | 34 | open(FD, "find $from -name '*.[0-9ln]' -print |"); 35 | while ($find = ) { 36 | } 37 | 38 | if [ ! "${indexonly}" ] 39 | then 40 | print "Processing the man pages ..." 41 | for i in man${sections}/* 42 | do 43 | if [ "$verbose" ] 44 | then 45 | print $i 46 | fi 47 | # n=${i%.*} 48 | name=${to}/${i} 49 | if [ -a "${name}" ] 50 | then 51 | oldname=$name 52 | disambiguate $name 53 | name=$newname 54 | print "Collision - ${oldname} will be stored as ${name}" 55 | fi 56 | eqn $i | tbl | nroff -man | rman -f HTML | sed -e "s/MS_LOCAL_HOST/${localeo}/g" > ${name} 57 | done 58 | fi 59 | 60 | print "Building the index.html files ..." 61 | cd $to 62 | for i in man${sections} 63 | do 64 | if [ "$verbose" ] 65 | then 66 | print $i 67 | fi 68 | cd $i 69 | rm -f index.html 70 | echo '

' >> ../new.html 81 | mv ../new.html index.html 82 | cd .. 83 | done 84 | -------------------------------------------------------------------------------- /lmbench/scripts/info: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | UNAME=`uname -n 2>/dev/null` 4 | if [ X$UNAME = X ] 5 | then echo INFO 6 | else echo INFO.$UNAME 7 | fi 8 | -------------------------------------------------------------------------------- /lmbench/scripts/info-template: -------------------------------------------------------------------------------- 1 | Thanks very much for filling this out. The system will save it across 2 | runs so that you don't have to do it again unless you change what you 3 | are measuring (i.e., add disks to the mix). The stuff you fill in is 4 | in lower case, the uppercase stuff you should leave as is. 5 | 6 | If you used "vi" and you don't know how to use it, just type ZZ and skip 7 | this step. 8 | 9 | VENDOR: i.e. SGI, Compaq, Sun, etc. For PC clones, just say clone. 10 | 11 | MOTHERBOARD: this mostly for PC's - it's very important to know there. 12 | 13 | MODEL: SGI O200, Sun Ultra2, Compaq Pressario, Gateway 10,000,000 14 | 15 | YEAR BOUGHT: 1982 16 | 17 | PRICE: $10,000 18 | 19 | PROCESSORS: 20 | NUMBER: 2 21 | TYPE: 200 Mhz Pentium Pro 22 | 23 | MEMORY: 24 | AMOUNT: 32M, etc. 25 | SPEED: i.e, 60ns, 70ns, etc. 26 | TYPE: FPM, EDO, DIMM, etc 27 | 28 | CACHE: 29 | ONCHIP DCACHE: 32K, set associative (2 or 4 way, can't remember) 30 | ONCHIP ICACHE: 32K, set associative (2 or 4 way, can't remember) 31 | LEVEL 2: 1MB, 2 way set associative, unified 32 | 33 | NETWORK: 34 | ETHERNET: 100baseT, DEC Tulip chip, SMC PCI card 35 | HIPPI: 100MB/sec, 64bit PCI, SGI onboard R4K processors, full duplex 36 | 37 | DISKS: 38 | /dev/sda 4GB Quantum, model 1234 39 | 40 | MISC: 41 | Anything else that you think is interesting for people 42 | to know about your system. 43 | -------------------------------------------------------------------------------- /lmbench/scripts/make: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "X$MAKE" != "X" ] && echo "$MAKE" | grep '`' > /dev/null 4 | then 5 | MAKE= 6 | fi 7 | 8 | if [ X$MAKE = X ] 9 | then MAKE=make 10 | for p in `echo $PATH | sed 's/:/ /g'` 11 | do if [ -f $p/gmake ] 12 | then 13 | if $p/gmake testmake > /dev/null 2>&1 14 | then 15 | MAKE=$p/gmake 16 | fi 17 | fi 18 | done 19 | fi 20 | echo $MAKE 21 | -------------------------------------------------------------------------------- /lmbench/scripts/mkrelease: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # %W% 4 | # 5 | # XXX - does not check for checked out files. 6 | 7 | make -s clean 8 | make -s get 9 | VERS=`egrep 'MAJOR|MINOR' src/version.h | awk '{print $3}'` 10 | set `echo $VERS` 11 | if [ $2 -lt 0 ] 12 | then VERS=`echo $1$2 | sed s/-/alpha/` 13 | else VERS=`echo $VERS |sed 's/ /./'` 14 | fi 15 | D=lmbench-$VERS 16 | mkdir $D $D/results 17 | cp -rp SCCS doc hbench-REBUTTAL lmbench-HOWTO scripts src $D 18 | cp -rp results/SCCS $D/results 19 | (cd $D && make -s get) 20 | /bin/rm -rf $D/SCCS $D/*/SCCS 21 | tar czvf $D.tgz $D 22 | /bin/rm -rf $D 23 | make -s clean 24 | -------------------------------------------------------------------------------- /lmbench/scripts/new2oldctx: -------------------------------------------------------------------------------- 1 | 2 | # Convert the new format: 3 | # Context switch of 8 4k processes: 64.17 (60.02 overhead) 4 | # to the old format: 5 | #"size=0 ovr=22 6 | # 2 8 7 | # 4 14 8 | # 8 18 9 | # 16 21 10 | # 20 22 11 | 12 | eval 'exec perl -Ssw $0 "$@"' 13 | if 0; 14 | 15 | @lines = grep(/Context switch/, <>); 16 | foreach $size ("0k", "4k", "16k", "32k", "64k") { 17 | @data = grep(/$size/, @lines); 18 | @a = @b = @c = (); 19 | $i = 0; 20 | foreach $n (2, 4, 8, 16, 20) { 21 | @tmp = (); 22 | foreach $_ (grep(/of $n/, @data)) { 23 | @_ = split; 24 | push(@tmp, "$_[3] $_[6]\n"); 25 | } 26 | ($a[$i],$b[$i],$c[$i]) = @tmp; 27 | $i++; 28 | } 29 | print "\n\"size=$size \n"; 30 | print @c; 31 | } 32 | -------------------------------------------------------------------------------- /lmbench/scripts/opercent: -------------------------------------------------------------------------------- 1 | 2 | eval "exec perl -sS $0 $*" 3 | if 0; 4 | 5 | $fmt = 0; 6 | @fmts = ( 7 | "%33s %4s %4s %3s %4s %4s %4s %4s %4s %4s\n", 8 | "%28s %6s %6s %5s %6s %7s %7s\n", 9 | "%29s %5s %4s %5s %5s %5s %5s %4s\n", 10 | "%30s %6s %6s %6s %8s %5s %7s\n", 11 | "%28s %4s %4s %6s %6s %6s %6s %4s %5s\n", 12 | "%29s %5s %6s %11s\n", 13 | ); 14 | while (<>) { 15 | print; 16 | next unless /^Host/; 17 | $_ = <>; print; 18 | unless (/^-/) { 19 | $_ = <>; print; 20 | } 21 | @values = (); 22 | @a = @b = @c = @d = @e = @f = @g = @h = @i = @j = @k = (); 23 | $i = 0; 24 | while (<>) { 25 | last if /^\s/; 26 | print; 27 | s/.......................\s+//; 28 | ($a[$i],$b[$i],$c[$i],$d[$i],$e[$i],$f[$i],$g[$i],$h[$i],$i[$i],$j[$i],$k[$i]) = split; 29 | $i++; 30 | } 31 | $a = &sss(@a) if $#a != -1; 32 | $b = &sss(@b) if $#b != -1; 33 | $c = &sss(@c) if $#c != -1; 34 | $d = &sss(@d) if $#d != -1; 35 | $e = &sss(@e) if $#e != -1; 36 | $f = &sss(@f) if $#f != -1; 37 | $g = &sss(@g) if $#g != -1; 38 | $h = &sss(@h) if $#h != -1; 39 | $i = &sss(@i) if $#i != -1; 40 | $j = &sss(@j) if $#j != -1; 41 | $k = &sss(@k) if $#k != -1; 42 | printf $fmts[$fmt], $a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k; 43 | print "\n"; 44 | exit if $fmt++ == $#fmts; 45 | } 46 | 47 | sub sss 48 | { 49 | local($tmp); 50 | local(@values) = (); 51 | local($n, $sum, $min, $max) = (0,0,1.7E+300,2.2E-300); 52 | 53 | foreach $_ (@_) { 54 | next unless /^\d/; 55 | chop if /K$/; 56 | push(@values, $_); 57 | $sum += $_; 58 | $min = $_ if $_ < $min; 59 | $max = $_ if $_ > $max; 60 | $n++; 61 | } 62 | return "" if $#values == -1; 63 | # Do some statistics. 64 | @s = sort(@values); 65 | if ($n & 1) { 66 | $median = $s[($n + 1)/2]; 67 | } else { 68 | $i = $n / 2; 69 | $median = ($s[$i] + $s[$i+1]) / 2; 70 | } 71 | $avg = $sum/$n; 72 | $avgdev = $var = 0; 73 | foreach $_ (@values) { 74 | $var += ($_ - $median) ** 2; 75 | $tmp = $_ - $median; 76 | $avgdev += $tmp > 0 ? $tmp : -$tmp; 77 | } 78 | $var /= $n - 1; 79 | $stddev = sqrt($var); 80 | $avgdev /= $n; 81 | #printf("%8s %8s %8s %8s %8s %4s %8s\n", "Min", "Max", "Average", "Median", "Std Dev", "%", "Avg Dev"); 82 | #printf "%8.2f %8.2f %8.2f %8.2f %8.2f %4.1f%% %8.2f\n", $min, $max, $avg, $median, $stddev, $stddev/$median*100, $avgdev; 83 | $percent = $stddev/$median*100; 84 | if ($percent > 90) { 85 | printf "Huh: $percent $stddev $median @values\n"; 86 | } 87 | if ($percent >= 10) { 88 | return sprintf "%.0f%%", $percent; 89 | } else { 90 | return sprintf "%.1f%%", $percent; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /lmbench/scripts/os: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "X$OS" != "X" ] && echo "$OS" | grep '`' > /dev/null 4 | then 5 | OS= 6 | fi 7 | 8 | if [ "X$OS" = "X" ] 9 | then OS=bloat-os 10 | MACHINE=`uname -m | sed -e 's/ //g' | sed -e 's?/?-?g'` 11 | SYSTEM=`uname -s | sed -e 's/ //g' | sed -e 's?/?-?g'` 12 | OS="${MACHINE}-${SYSTEM}" 13 | if [ -f ../scripts/gnu-os ] 14 | then OS=`../scripts/gnu-os | sed s/unknown-//` 15 | fi 16 | if [ -f ../../scripts/gnu-os ] 17 | then OS=`../../scripts/gnu-os | sed s/unknown-//` 18 | fi 19 | fi 20 | OS=arm-linux 21 | echo $OS 22 | -------------------------------------------------------------------------------- /lmbench/scripts/output: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | trap "echo /dev/null" 20 3 | OUTPUT=/dev/null; export OUTPUT 4 | if [ -w /dev/tty ]; then 5 | if echo "" > /dev/tty; then 6 | OUTPUT=/dev/tty; export OUTPUT 7 | fi 8 | fi 2>/dev/null 9 | echo "${OUTPUT}" 10 | exit 0 11 | -------------------------------------------------------------------------------- /lmbench/scripts/percent: -------------------------------------------------------------------------------- 1 | 2 | eval "exec perl -sS $0 $*" 3 | if 0; 4 | 5 | $fmt = 0; 6 | @fmts = ( 7 | "%24s %4s %4s %3s %4s %5s %4s %4s %4s %5s %4s %3s\n", 8 | "%24s %4s %6s %5s %5s %6s %7s %7s\n", 9 | "%24s %4s %5s %4s %5s %5s %5s %5s %4s\n", 10 | "%24s %6s %6s %6s %8s %5s %7s\n", 11 | "%24s %3s %4s %4s %6s %7s %6s %5s %5s %5s\n", 12 | "%24s %5s %5s %5s %12s\n", 13 | ); 14 | while (<>) { 15 | print; 16 | next unless /^Host/; 17 | $_ = <>; print; 18 | unless (/^-/) { 19 | $_ = <>; print; 20 | } 21 | @values = (); 22 | @a = @b = @c = @d = @e = @f = @g = @h = @i = @j = @k = (); 23 | $i = 0; 24 | while (<>) { 25 | last if /^\s/; 26 | print; 27 | s/.......................\s+//; 28 | ($a[$i],$b[$i],$c[$i],$d[$i],$e[$i],$f[$i],$g[$i],$h[$i],$i[$i],$j[$i],$k[$i]) = split; 29 | $i++; 30 | } 31 | $a = &sss(@a) if $#a != -1; 32 | $b = &sss(@b) if $#b != -1; 33 | $c = &sss(@c) if $#c != -1; 34 | $d = &sss(@d) if $#d != -1; 35 | $e = &sss(@e) if $#e != -1; 36 | $f = &sss(@f) if $#f != -1; 37 | $g = &sss(@g) if $#g != -1; 38 | $h = &sss(@h) if $#h != -1; 39 | $i = &sss(@i) if $#i != -1; 40 | $j = &sss(@j) if $#j != -1; 41 | $k = &sss(@k) if $#k != -1; 42 | printf $fmts[$fmt], "", $a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k; 43 | print "\n"; 44 | exit if $fmt++ == $#fmts; 45 | } 46 | 47 | sub sss 48 | { 49 | local($i, $tmp); 50 | local(@values) = (); 51 | local($n, $sum, $min, $max) = (0,0,1.7E+300,2.2E-300); 52 | 53 | foreach $_ (@_) { 54 | next unless /^\d/; 55 | chop if /K$/; 56 | push(@values, $_); 57 | $sum += $_; 58 | $min = $_ if $_ < $min; 59 | $max = $_ if $_ > $max; 60 | $n++; 61 | } 62 | return "" if $#values == -1; 63 | # Do some statistics. 64 | @s = sort(@values); 65 | if ($n & 1) { 66 | $median = $s[($n + 1)/2]; 67 | } else { 68 | $i = $n / 2; 69 | $median = ($s[$i] + $s[$i+1]) / 2; 70 | } 71 | $avg = $sum/$n; 72 | $avgdev = $var = 0; 73 | foreach $_ (@values) { 74 | $var += ($_ - $median) ** 2; 75 | $tmp = $_ - $median; 76 | $avgdev += $tmp > 0 ? $tmp : -$tmp; 77 | } 78 | $var /= $n - 1; 79 | $stddev = sqrt($var); 80 | $avgdev /= $n; 81 | #printf("%8s %8s %8s %8s %8s %4s %8s\n", "Min", "Max", "Average", "Median", "Std Dev", "%", "Avg Dev"); 82 | #printf "%8.2f %8.2f %8.2f %8.2f %8.2f %4.1f%% %8.2f\n", $min, $max, $avg, $median, $stddev, $stddev/$median*100, $avgdev; 83 | $percent = $stddev/$median*100; 84 | if ($percent > 90) { 85 | printf "Huh: $percent $stddev $median @values\n"; 86 | } 87 | if ($percent < .5) { 88 | return "0 "; 89 | } elsif ($percent < 1) { 90 | $tmp = sprintf "%.1f%%", $percent; 91 | return $tmp; 92 | } else { 93 | return sprintf "%.0f%%", $percent; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lmbench/scripts/results: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # $Id$ 4 | 5 | OS=`../scripts/os` 6 | CONFIG=`../scripts/config` 7 | RESULTS=results/$OS 8 | BASE=../$RESULTS/`uname -n` 9 | EXT=0 10 | 11 | if [ ! -f "../bin/$OS/$CONFIG" ] 12 | then echo "No config file?" 13 | exit 1 14 | fi 15 | . ../bin/$OS/$CONFIG 16 | 17 | if [ ! -d ../$RESULTS ] 18 | then mkdir -p ../$RESULTS 19 | fi 20 | RESULTS=$BASE.$EXT 21 | while [ -f $RESULTS ] 22 | do EXT=`expr $EXT + 1` 23 | RESULTS=$BASE.$EXT 24 | done 25 | 26 | cd ../bin/$OS 27 | PATH=.:${PATH}; export PATH 28 | export SYNC_MAX 29 | export OUTPUT 30 | lmbench $CONFIG 2>../${RESULTS} 31 | 32 | if [ X$MAIL = Xyes ] 33 | then echo Mailing results 34 | (echo ---- $INFO --- 35 | cat $INFO 36 | echo ---- $RESULTS --- 37 | cat ../$RESULTS) | mail lmbench3@bitmover.com 38 | fi 39 | exit 0 40 | -------------------------------------------------------------------------------- /lmbench/scripts/save: -------------------------------------------------------------------------------- 1 | # Save the input in the specified file if possible. If the file exists, 2 | # add a numeric suffice, i.e., .1, and increment that until the file 3 | # does not exist. Use the first name found as the file to save. 4 | # 5 | # Typical usage is: xroff -man -fH *.1 | save MAN.PS 6 | # 7 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 8 | # Copyright (c) 1994 Larry McVoy. GPLed software. 9 | # $Id$ 10 | eval 'exec perl -Ssw $0 "$@"' 11 | if 0; 12 | 13 | $base = $#ARGV == 0 ? shift : "save"; 14 | $file = $base; 15 | $ext = 1; 16 | 17 | while (-e $file) { 18 | $file = "$base.$ext"; 19 | $ext++; 20 | } 21 | warn "Saving in $file\n"; 22 | open(FD, ">$file"); 23 | while(<>) { 24 | print FD; 25 | } 26 | exit 0; 27 | -------------------------------------------------------------------------------- /lmbench/scripts/stats: -------------------------------------------------------------------------------- 1 | 2 | # Convert the Y coordinate to an average 3 | 4 | eval "exec perl -sS $0 $*" 5 | if 0; 6 | 7 | @values = (); 8 | $sum = $n = 0; 9 | $min = 1.7E+308; 10 | $max = 2.2E-308; 11 | while (<>) { 12 | next if /^[%#]/; 13 | @_ = split; 14 | if ($_[0] > 1000000) { 15 | #warn "$file: ignoring $_"; 16 | next; 17 | } 18 | if ($#_ >= 1) { 19 | $val = $_[1]; 20 | } else { 21 | $val = $_[0]; 22 | } 23 | push(@values, $val); 24 | $sum += $val; 25 | $min = $val if $val < $min; 26 | $max = $val if $val > $max; 27 | $n++; 28 | } 29 | # Do some statistics. 30 | @s = sort(@values); 31 | if ($n & 1) { 32 | $median = $s[($n + 1)/2]; 33 | } else { 34 | $i = $n / 2; 35 | $median = ($s[$i] + $s[$i+1]) / 2; 36 | } 37 | $avg = $sum/$n; 38 | $avgdev = $var = 0; 39 | foreach $_ (@values) { 40 | $var += ($_ - $median) ** 2; 41 | $tmp = $_ - $median; 42 | $avgdev += $tmp > 0 ? $tmp : -$tmp; 43 | } 44 | $var /= $n - 1; 45 | $stddev = sqrt($var); 46 | $avgdev /= $n; 47 | #printf("%8s %8s %8s %8s %8s %4s %8s\n", "Min", "Max", "Average", "Median", "Std Dev", "%", "Avg Dev"); 48 | #printf "%8.2f %8.2f %8.2f %8.2f %8.2f %4.1f%% %8.2f\n", $min, $max, $avg, $median, $stddev, $stddev/$median*100, $avgdev; 49 | printf "%4.1f%%\n", $stddev/$median*100; 50 | exit 0; 51 | -------------------------------------------------------------------------------- /lmbench/scripts/synchronize: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # %W% %@% Copyright (c) 1998 Larry McVoy. 4 | # 5 | # Usage: SYNC_PID=3 SYNC_MAX=20 synchronize /tmp/sync_dir 6 | # 7 | # Used to sync up a bunch of processes so that they can operate in lockstep 8 | # as much as possible. 9 | # 10 | # The first process to try and sync will mkdir(pathname) and create a named 11 | # pipe in the directory. It also creates a file, pathname/$PID where pid 12 | # is not the process id, it is the process number. The group of processes 13 | # must be numbered from 1..N and they must each know their number. The Nth 14 | # process is the master. Whereas all the other processes block, opening the 15 | # pipe, the master spins in a loop, waiting for pathname/1 .. pathname/N-1 16 | # to show up in the directory. When they are all there, the master opens 17 | # the pipe for writing and all the other processes get woken up and leave. 18 | # 19 | # It is outside of this program, but the directory must not exist before the 20 | # synchronization. So you typically rm -rf it well before trying to sync. 21 | 22 | if [ X$1 = X ]; then echo "Usage: $0 pathname"; exit 1; fi 23 | if [ X$SYNC_PID = X ]; then echo "Must set SYNC_PID"; exit 1; fi 24 | if [ X$SYNC_MAX = X ]; then echo "Must set SYNC_MAX"; exit 1; fi 25 | 26 | DIR=$1 27 | mkdir -p $DIR 2>/dev/null 28 | if [ ! -e $DIR/fifo ] 29 | then mkfifo $DIR/fifo 2>/dev/null 30 | chmod 666 $DIR/fifo 2>/dev/null 31 | fi 32 | 33 | # slaves just read the pipe 34 | if [ $SYNC_PID != $SYNC_MAX ] 35 | then touch $DIR/$SYNC_PID 36 | read x < $DIR/fifo 37 | exit 0 38 | fi 39 | 40 | # Master waits for all the other processes to get there 41 | PIDS="" 42 | I=1 43 | while [ $I -lt $SYNC_MAX ] 44 | do PIDS=" $I$PIDS" 45 | I=`expr $I + 1` 46 | done 47 | while true 48 | do GO=Y 49 | for s in $PIDS 50 | do if [ ! -e $DIR/$s ] 51 | then GO=N 52 | fi 53 | done 54 | if [ $GO = Y ] 55 | then # This assumes that all the processes will 56 | echo sleep 2 > $DIR/fifo & 57 | exit 0 58 | fi 59 | msleep 250 60 | done 61 | -------------------------------------------------------------------------------- /lmbench/scripts/target: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Figure out the OS name if possible. 4 | # 5 | # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com). 6 | # Copyright (c) 1994 Larry McVoy. GPLed software. 7 | # $Id$ 8 | case `uname -s` in 9 | *HP-UX*) echo hpux;; 10 | *Linux*) echo linux;; 11 | *IRIX*) echo irix;; 12 | *AIX*) echo aix;; 13 | BSD/OS) echo bsdi;; 14 | *BSD*) echo bsd;; 15 | *OSF1*) echo osf1;; 16 | *ULTRIX*) echo ultrix;; 17 | *SunOS*) case `uname -r` in 18 | 4*) echo sunos;; 19 | 5*) echo solaris;; 20 | *) echo unknown;; 21 | esac;; 22 | *) echo unknown;; 23 | esac 24 | exit 0 25 | -------------------------------------------------------------------------------- /lmbench/scripts/version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # %W% %@% 4 | 5 | F="no_such_file" 6 | VERSION="3.0-`date '+%Y%m%d'`" 7 | for f in version.h ../src/version.h src/version.h 8 | do 9 | if [ $F = "no_such_file" -a -f $f ] 10 | then 11 | F=$f 12 | fi 13 | done 14 | if [ -f $F ] 15 | then VERSION=`awk '/MAJOR/ { major = $3; } /MINOR/ { minor=$3;} END { if (minor < 0) printf("%d.0-a%d", major, -minor); else printf("%d.%d", major, minor);}' $F` 16 | fi 17 | echo $VERSION 18 | -------------------------------------------------------------------------------- /lmbench/scripts/xroff: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # X previewer like groff/nroff scripts. 4 | groff -P -filename -P "| groff -Z -X -Tps $*" -X -Tps "$@" 5 | exit 0 6 | -------------------------------------------------------------------------------- /lmbench/src/busy.c: -------------------------------------------------------------------------------- 1 | volatile int i; 2 | 3 | main() 4 | { 5 | 6 | nice(10); 7 | for (;;) getppid(); 8 | //for (;;) i++; 9 | exit(i); 10 | } 11 | -------------------------------------------------------------------------------- /lmbench/src/clock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * clock.c 3 | * 4 | * calculate the minimum timing loop length that gives us significant results 5 | */ 6 | #include "bench.h" 7 | 8 | char *id = "$Id$"; 9 | char *revision = "$Revision$"; 10 | 11 | main() 12 | { 13 | uint64 enough; 14 | double t_overhead, l_overhead; 15 | 16 | enough = compute_enough(15); 17 | printf("ENOUGH=%lu\n", (unsigned long)enough); fflush(stdout); 18 | t_overhead = timing_overhead(enough); 19 | printf("TIMING_OVERHEAD=%f\n", t_overhead); fflush(stdout); 20 | l_overhead = loop_overhead(enough, t_overhead); 21 | printf("LOOP_OVERHEAD=%f\n", l_overhead); 22 | printf("# version [%s]\n", revision); 23 | exit(0); 24 | } 25 | -------------------------------------------------------------------------------- /lmbench/src/enough.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern int get_enough(int); 5 | 6 | int 7 | main() 8 | { 9 | putenv("LOOP_O=0.0"); 10 | putenv("TIMING_O=0.0"); 11 | printf("%u\n", get_enough(0)); 12 | return (0); 13 | } 14 | -------------------------------------------------------------------------------- /lmbench/src/flushdisk.c: -------------------------------------------------------------------------------- 1 | #ifdef linux 2 | /* 3 | * flushdisk() - linux block cache clearing 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | int 15 | flushdisk(int fd) 16 | { 17 | int ret = ioctl(fd, BLKFLSBUF, 0); 18 | usleep(100000); 19 | return (ret); 20 | } 21 | 22 | #endif 23 | 24 | #ifdef MAIN 25 | int 26 | main(int ac, char **av) 27 | { 28 | #ifdef linux 29 | int fd; 30 | int i; 31 | 32 | for (i = 1; i < ac; ++i) { 33 | fd = open(av[i], 0); 34 | if (flushdisk(fd)) { 35 | exit(1); 36 | } 37 | close(fd); 38 | } 39 | #endif 40 | return(0); 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /lmbench/src/hello.c: -------------------------------------------------------------------------------- 1 | #include "bench.h" 2 | 3 | int 4 | main() 5 | { 6 | write(1, "Hello world\n", 12); 7 | return (0); 8 | } 9 | -------------------------------------------------------------------------------- /lmbench/src/lat_cmd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lat_cmd.c - time to complete a given command line 3 | * 4 | * usage: lat_cmd [-P ] [-W ] [-N ] cmd... 5 | * 6 | * Copyright (c) 2004 Carl Staelin. Distributed under the FSF GPL with 7 | * additional restriction that results may published only if 8 | * (1) the benchmark is unmodified, and 9 | * (2) the version in the sccsid below is included in the report. 10 | * Support for this development by Sun Microsystems is gratefully acknowledged. 11 | */ 12 | char *id = "$Id$\n"; 13 | 14 | #include "bench.h" 15 | 16 | void bench(iter_t iterations, void *cookie); 17 | void cleanup(iter_t iterations, void *cookie); 18 | 19 | typedef struct _state { 20 | char** argv; 21 | pid_t pid; 22 | } state_t; 23 | 24 | int 25 | main(int ac, char **av) 26 | { 27 | int c; 28 | int i; 29 | int parallel = 1; 30 | int warmup = 0; 31 | int repetitions = -1; 32 | state_t state; 33 | char* usage = "[-P ] [-W ] [-N ] cmdline...\n"; 34 | 35 | while (( c = getopt(ac, av, "P:W:N:")) != EOF) { 36 | switch(c) { 37 | case 'P': 38 | parallel = atoi(optarg); 39 | if (parallel <= 0) lmbench_usage(ac, av, usage); 40 | break; 41 | case 'W': 42 | warmup = atoi(optarg); 43 | break; 44 | case 'N': 45 | repetitions = atoi(optarg); 46 | break; 47 | default: 48 | lmbench_usage(ac, av, usage); 49 | break; 50 | } 51 | } 52 | if (optind >= ac) { 53 | lmbench_usage(ac, av, usage); 54 | } 55 | state.argv = (char**)malloc((ac - optind + 1) * sizeof(char*)); 56 | if (!state.argv) { 57 | perror("malloc"); 58 | exit(1); 59 | } 60 | state.pid = 0; 61 | for (i = 0; i < ac - optind; ++i) { 62 | state.argv[i] = av[optind + i]; 63 | } 64 | state.argv[i] = NULL; 65 | 66 | benchmp(NULL, bench, NULL, 0, parallel, warmup, repetitions, &state); 67 | micro("lat_cmd", get_n()); 68 | return (0); 69 | } 70 | 71 | void 72 | cleanup(iter_t iterations, void* cookie) 73 | { 74 | state_t* state = (state_t*)cookie; 75 | 76 | if (iterations) return; 77 | 78 | if (state->pid) { 79 | kill(state->pid, SIGKILL); 80 | waitpid(state->pid, NULL, 0); 81 | state->pid = 0; 82 | } 83 | } 84 | 85 | void 86 | bench(register iter_t iterations, void *cookie) 87 | { 88 | state_t *state = (state_t *) cookie; 89 | 90 | signal(SIGCHLD, SIG_DFL); 91 | while (iterations-- > 0) { 92 | switch (state->pid = fork()) { 93 | case '0': 94 | execvp(state->argv[0], state->argv); 95 | /*NOTREACHED*/ 96 | default: 97 | break; 98 | } 99 | waitpid(state->pid, NULL, 0); 100 | state->pid = 0; 101 | } 102 | } 103 | 104 | -------------------------------------------------------------------------------- /lmbench/src/lat_connect.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lat_connect.c - simple TCP connection latency test 3 | * 4 | * Three programs in one - 5 | * server usage: lat_connect -s 6 | * client usage: lat_connect [-N ] hostname 7 | * shutdown: lat_connect -hostname 8 | * 9 | * lat_connect may not be parallelized because of idiosyncracies 10 | * with TCP connection creation. Basically, if the client tries 11 | * to create too many connections too quickly, the system fills 12 | * up the set of available connections with TIME_WAIT connections. 13 | * We can only measure the TCP connection cost accurately if we 14 | * do just a few connections. Since the parallel harness needs 15 | * each child to run for a second, this guarantees that the 16 | * parallel version will generate inaccurate results. 17 | * 18 | * Copyright (c) 1994 Larry McVoy. Distributed under the FSF GPL with 19 | * additional restriction that results may published only if 20 | * (1) the benchmark is unmodified, and 21 | * (2) the version in the sccsid below is included in the report. 22 | * Support for this development by Sun Microsystems is gratefully acknowledged. 23 | */ 24 | char *id = "$Id$\n"; 25 | #include "bench.h" 26 | 27 | typedef struct _state { 28 | char *server; 29 | } state_t; 30 | 31 | void doclient(iter_t iterations, void * cookie); 32 | void server_main(); 33 | 34 | int 35 | main(int ac, char **av) 36 | { 37 | state_t state; 38 | int repetitions = -1; 39 | int c; 40 | char buf[256]; 41 | char *usage = "-s\n OR [-S] [-N ] server\n"; 42 | 43 | while (( c = getopt(ac, av, "sSP:W:N:")) != EOF) { 44 | switch(c) { 45 | case 's': /* Server */ 46 | if (fork() == 0) { 47 | server_main(); 48 | } 49 | exit(0); 50 | case 'S': /* shutdown serverhost */ 51 | { 52 | int sock = tcp_connect(av[optind], 53 | TCP_CONNECT, 54 | SOCKOPT_NONE); 55 | write(sock, "0", 1); 56 | close(sock); 57 | exit(0); 58 | } 59 | case 'N': 60 | repetitions = atoi(optarg); 61 | break; 62 | default: 63 | lmbench_usage(ac, av, usage); 64 | break; 65 | } 66 | } 67 | 68 | if (optind + 1 != ac) { 69 | lmbench_usage(ac, av, usage); 70 | } 71 | 72 | state.server = av[optind]; 73 | benchmp(NULL, doclient, NULL, 0, 1, 0, repetitions, &state); 74 | 75 | sprintf(buf, "TCP/IP connection cost to %s", state.server); 76 | micro(buf, get_n()); 77 | exit(0); 78 | } 79 | 80 | void 81 | doclient(iter_t iterations, void *cookie) 82 | { 83 | state_t *state = (state_t *) cookie; 84 | register char *server = state->server; 85 | register int sock; 86 | 87 | while (iterations-- > 0) { 88 | sock = tcp_connect(server, TCP_CONNECT, SOCKOPT_REUSE); 89 | close(sock); 90 | } 91 | } 92 | 93 | void 94 | server_main() 95 | { 96 | int newsock, sock; 97 | char c ='1'; 98 | 99 | GO_AWAY; 100 | sock = tcp_server(TCP_CONNECT, SOCKOPT_NONE|SOCKOPT_REUSE); 101 | for (;;) { 102 | newsock = tcp_accept(sock, SOCKOPT_NONE); 103 | if (read(newsock, &c, 1) > 0) { 104 | tcp_done(TCP_CONNECT); 105 | exit(0); 106 | } 107 | close(newsock); 108 | } 109 | /* NOTREACHED */ 110 | } 111 | -------------------------------------------------------------------------------- /lmbench/src/lat_http.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lat_http.c - simple HTTP transaction latency test 3 | * 4 | * usage: lat_http hostname [port] < filelist 5 | * 6 | * Copyright (c) 1994-6 Larry McVoy. Distributed under the FSF GPL with 7 | * additional restriction that results may published only if 8 | * (1) the benchmark is unmodified, and 9 | * (2) the version in the sccsid below is included in the report. 10 | * Support for this development by Sun Microsystems is gratefully acknowledged. 11 | */ 12 | char *id = "$Id$\n"; 13 | 14 | #include "bench.h" 15 | 16 | char *buf; 17 | int debug; 18 | int echo; 19 | 20 | int 21 | http(char *server, char *file, int prog) 22 | { 23 | int sock; 24 | int n; 25 | int b = 0; 26 | 27 | sock = tcp_connect(server, prog, SOCKOPT_REUSE); 28 | sprintf(buf, "GET /%s HTTP/1.0\r\n\r\n\n", file); 29 | if (debug) { 30 | printf(buf); 31 | } 32 | write(sock, buf, strlen(buf)); 33 | while ((n = read(sock, buf, XFERSIZE)) > 0) { 34 | b += n; 35 | if (echo) { 36 | write(1, buf, n); 37 | } 38 | } 39 | close(sock); 40 | if (debug) { 41 | printf("Got %d\n", b); 42 | } 43 | return (b); 44 | } 45 | 46 | void 47 | killhttp(char *server, int prog) 48 | { 49 | int sock; 50 | 51 | sock = tcp_connect(server, prog, SOCKOPT_REUSE); 52 | write(sock, "EXIT", 4); 53 | close(sock); 54 | } 55 | 56 | void chop(register char *s) { while (*s && *s != '\n') s++; *s = 0; } 57 | 58 | int 59 | main(int ac, char **av) 60 | { 61 | char *server; 62 | int i, prog; 63 | int c; 64 | int shutdown = 0; 65 | uint64 total = 0; 66 | uint64 usecs = 0; 67 | double avg; 68 | char *name = av[0]; 69 | char file[1024]; 70 | char *usage = "[-d] [-e] [-S] serverhost [port] < list\n"; 71 | 72 | while (( c = getopt(ac, av, "deS")) != EOF) { 73 | switch(c) { 74 | case 'd': 75 | debug++; 76 | break; 77 | case 'e': 78 | echo++; 79 | break; 80 | case 'S': /* shutdown serverhost */ 81 | shutdown = 1; 82 | break; 83 | default: 84 | lmbench_usage(ac, av, usage); 85 | break; 86 | } 87 | } 88 | 89 | if (optind >= ac || optind < ac - 2) { 90 | lmbench_usage(ac, av, usage); 91 | exit(0); 92 | } 93 | server = av[optind++]; 94 | 95 | if (optind < ac && atoi(av[optind]) != 0) { 96 | prog = -atoi(av[optind]); 97 | } else { 98 | prog = -80; 99 | } 100 | 101 | if (shutdown) { 102 | killhttp(server, prog); 103 | exit(0); 104 | } 105 | 106 | i = 0; 107 | buf = valloc(XFERSIZE); 108 | if (!buf) { 109 | perror("valloc"); 110 | exit(1); 111 | } 112 | bzero(buf, XFERSIZE); 113 | while (fgets(file, sizeof(file), stdin)) { 114 | chop(file); 115 | start(0); 116 | total += http(server, file, prog); 117 | usecs += stop(0,0); 118 | i++; 119 | } 120 | avg = total; 121 | avg /= (i - 1); 122 | if (avg > 1000) { 123 | avg /= 1000; 124 | fprintf(stderr, "Avg xfer: %.1fKB, ", avg); 125 | } else { 126 | fprintf(stderr, "Avg xfer %d, ", (int)avg); 127 | } 128 | settime(usecs); 129 | latency((uint64)1, total); 130 | exit(0); 131 | } 132 | 133 | -------------------------------------------------------------------------------- /lmbench/src/lat_rand.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lat_rand.c - random number generation 3 | * 4 | * usage: lat_rand [-P ] [-W ] [-N ] 5 | * 6 | * Copyright (c) 2002 Carl Staelin. Distributed under the FSF GPL with 7 | * additional restriction that results may published only if 8 | * (1) the benchmark is unmodified, and 9 | * (2) the version in the sccsid below is included in the report. 10 | * Support for this development by Hewlett-Packard is gratefully acknowledged. 11 | */ 12 | char *id = "$Id$\n"; 13 | 14 | #include "bench.h" 15 | 16 | #ifdef HAVE_DRAND48 17 | void bench_drand48(iter_t iterations, void *cookie); 18 | void bench_lrand48(iter_t iterations, void *cookie); 19 | #endif 20 | #ifdef HAVE_RAND 21 | void bench_rand(iter_t iterations, void *cookie); 22 | #endif 23 | #ifdef HAVE_RANDOM 24 | void bench_random(iter_t iterations, void *cookie); 25 | #endif 26 | int 27 | main(int ac, char **av) 28 | { 29 | int parallel = 1; 30 | int warmup = 0; 31 | int repetitions = -1; 32 | int c; 33 | char* usage = "[-P ] [-W ] [-N ]\n"; 34 | 35 | while (( c = getopt(ac, av, "P:W:N:")) != EOF) { 36 | switch(c) { 37 | case 'P': 38 | parallel = atoi(optarg); 39 | if (parallel <= 0) lmbench_usage(ac, av, usage); 40 | break; 41 | case 'W': 42 | warmup = atoi(optarg); 43 | break; 44 | case 'N': 45 | repetitions = atoi(optarg); 46 | break; 47 | default: 48 | lmbench_usage(ac, av, usage); 49 | break; 50 | } 51 | } 52 | if (optind < ac) { 53 | lmbench_usage(ac, av, usage); 54 | } 55 | 56 | #ifdef HAVE_DRAND48 57 | benchmp(NULL, bench_drand48, NULL, 58 | 0, parallel, warmup, repetitions, NULL); 59 | nano("drand48 latency", get_n()); 60 | 61 | benchmp(NULL, bench_lrand48, NULL, 62 | 0, parallel, warmup, repetitions, NULL); 63 | nano("lrand48 latency", get_n()); 64 | #endif 65 | #ifdef HAVE_RAND 66 | benchmp(NULL, bench_rand, NULL, 67 | 0, parallel, warmup, repetitions, NULL); 68 | nano("rand latency", get_n()); 69 | #endif 70 | #ifdef HAVE_RANDOM 71 | benchmp(NULL, bench_random, NULL, 72 | 0, parallel, warmup, repetitions, NULL); 73 | nano("random latency", get_n()); 74 | #endif 75 | return (0); 76 | } 77 | 78 | #ifdef HAVE_DRAND48 79 | void 80 | bench_drand48(register iter_t iterations, void *cookie) 81 | { 82 | register double v = 0.0; 83 | while (iterations-- > 0) { 84 | v += drand48(); 85 | } 86 | use_int((int)v); 87 | } 88 | 89 | void 90 | bench_lrand48(register iter_t iterations, void *cookie) 91 | { 92 | register long v = 0.0; 93 | while (iterations-- > 0) { 94 | v += lrand48(); 95 | } 96 | use_int((int)v); 97 | } 98 | #endif /* HAVE_DRAND48 */ 99 | #ifdef HAVE_RAND 100 | void 101 | bench_rand(register iter_t iterations, void *cookie) 102 | { 103 | register int v = 0.0; 104 | while (iterations-- > 0) { 105 | v += rand(); 106 | } 107 | use_int((int)v); 108 | } 109 | #endif /* HAVE_RAND */ 110 | #ifdef HAVE_RANDOM 111 | void 112 | bench_random(register iter_t iterations, void *cookie) 113 | { 114 | register int v = 0.0; 115 | while (iterations-- > 0) { 116 | v += random(); 117 | } 118 | use_int((int)v); 119 | } 120 | #endif /* HAVE_RANDOM */ 121 | -------------------------------------------------------------------------------- /lmbench/src/lat_unix_connect.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lat_unix_connect.c - simple UNIX connection latency test 3 | * 4 | * Three programs in one - 5 | * server usage: lat_connect -s 6 | * client usage: lat_connect [-P ] [-W ] [-N ] 7 | * shutdown: lat_connect -q 8 | * 9 | * Copyright (c) 1994 Larry McVoy. Distributed under the FSF GPL with 10 | * additional restriction that results may published only if 11 | * (1) the benchmark is unmodified, and 12 | * (2) the version in the sccsid below is included in the report. 13 | * Support for this development by Sun Microsystems is gratefully acknowledged. 14 | */ 15 | char *id = "$Id$\n"; 16 | #include "bench.h" 17 | 18 | #define CONNAME "/tmp/af_unix" 19 | 20 | void server_main(void); 21 | 22 | void benchmark(iter_t iterations, void* cookie) 23 | { 24 | while (iterations-- > 0) { 25 | int sock = unix_connect(CONNAME); 26 | if (sock <= 0) 27 | printf("error on iteration %lu\n",iterations); 28 | close(sock); 29 | } 30 | } 31 | 32 | int main(int ac, char **av) 33 | { 34 | int parallel = 1; 35 | int warmup = 0; 36 | int repetitions = -1; 37 | char *usage = "-s\n OR [-P ] [-W ] [-N ]\n OR -S\n"; 38 | int c; 39 | 40 | /* Start the server "-s" or Shut down the server "-S" */ 41 | if (ac == 2) { 42 | if (!strcmp(av[1], "-s")) { 43 | if (fork() == 0) { 44 | server_main(); 45 | } 46 | exit(0); 47 | } 48 | if (!strcmp(av[1], "-S")) { 49 | int sock = unix_connect(CONNAME); 50 | write(sock, "0", 1); 51 | close(sock); 52 | exit(0); 53 | } 54 | } 55 | 56 | /* 57 | * Rest is client 58 | */ 59 | while (( c = getopt(ac, av, "P:W:N:")) != EOF) { 60 | switch(c) { 61 | case 'P': 62 | parallel = atoi(optarg); 63 | if (parallel <= 0) lmbench_usage(ac, av, usage); 64 | break; 65 | case 'W': 66 | warmup = atoi(optarg); 67 | break; 68 | case 'N': 69 | repetitions = atoi(optarg); 70 | break; 71 | default: 72 | lmbench_usage(ac, av, usage); 73 | break; 74 | } 75 | } 76 | 77 | if (optind != ac) { 78 | lmbench_usage(ac, av, usage); 79 | } 80 | 81 | benchmp(NULL, benchmark, NULL, 0, parallel, warmup, repetitions, NULL); 82 | micro("UNIX connection cost", get_n()); 83 | } 84 | 85 | void server_main(void) 86 | { 87 | int newsock, sock; 88 | char c; 89 | 90 | GO_AWAY; 91 | sock = unix_server(CONNAME); 92 | for (;;) { 93 | newsock = unix_accept(sock); 94 | c = 0; 95 | read(newsock, &c, 1); 96 | if (c && c == '0') { 97 | unix_done(sock, CONNAME); 98 | exit(0); 99 | } 100 | close(newsock); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /lmbench/src/lib_debug.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIB_DEBUG_H 2 | #define _LIB_DEBUG_H 3 | 4 | void print_results(int details); 5 | void bw_quartile(uint64 bytes); 6 | void nano_quartile(uint64 n); 7 | void print_mem(char* addr, size_t size, size_t line); 8 | void check_mem(char* addr, size_t size); 9 | 10 | #endif /* _LIB_DEBUG_H */ 11 | -------------------------------------------------------------------------------- /lmbench/src/lib_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef LMBENCH_MEM_H 2 | #define LMBENCH_MEM_H 3 | 4 | 5 | #define MAX_MEM_PARALLELISM 16 6 | #define MEM_BENCHMARK_DECL(N) \ 7 | void mem_benchmark_##N(iter_t iterations, void* cookie); 8 | 9 | #define REPEAT_0(m) m(0) 10 | #define REPEAT_1(m) REPEAT_0(m) m(1) 11 | #define REPEAT_2(m) REPEAT_1(m) m(2) 12 | #define REPEAT_3(m) REPEAT_2(m) m(3) 13 | #define REPEAT_4(m) REPEAT_3(m) m(4) 14 | #define REPEAT_5(m) REPEAT_4(m) m(5) 15 | #define REPEAT_6(m) REPEAT_5(m) m(6) 16 | #define REPEAT_7(m) REPEAT_6(m) m(7) 17 | #define REPEAT_8(m) REPEAT_7(m) m(8) 18 | #define REPEAT_9(m) REPEAT_8(m) m(9) 19 | #define REPEAT_10(m) REPEAT_9(m) m(10) 20 | #define REPEAT_11(m) REPEAT_10(m) m(11) 21 | #define REPEAT_12(m) REPEAT_11(m) m(12) 22 | #define REPEAT_13(m) REPEAT_12(m) m(13) 23 | #define REPEAT_14(m) REPEAT_13(m) m(14) 24 | #define REPEAT_15(m) REPEAT_14(m) m(15) 25 | 26 | struct mem_state { 27 | char* addr; /* raw pointer returned by malloc */ 28 | char* base; /* page-aligned pointer */ 29 | char* p[MAX_MEM_PARALLELISM]; 30 | int initialized; 31 | int width; 32 | size_t len; 33 | size_t maxlen; 34 | size_t line; 35 | size_t pagesize; 36 | size_t nlines; 37 | size_t npages; 38 | size_t nwords; 39 | size_t* pages; 40 | size_t* lines; 41 | size_t* words; 42 | }; 43 | 44 | void stride_initialize(iter_t iterations, void* cookie); 45 | void thrash_initialize(iter_t iterations, void* cookie); 46 | void mem_initialize(iter_t iterations, void* cookie); 47 | void line_initialize(iter_t iterations, void* cookie); 48 | void tlb_initialize(iter_t iterations, void* cookie); 49 | void mem_cleanup(iter_t iterations, void* cookie); 50 | void tlb_cleanup(iter_t iterations, void* cookie); 51 | 52 | REPEAT_15(MEM_BENCHMARK_DECL) 53 | extern benchmp_f mem_benchmarks[]; 54 | 55 | ssize_t line_find(size_t l, int warmup, int repetitions, struct mem_state* state); 56 | double line_test(size_t l, int warmup, int repetitions, struct mem_state* state); 57 | double par_mem(size_t l, int warmup, int repetitions, struct mem_state* state); 58 | 59 | #endif /* LMBENCH_MEM_H */ 60 | 61 | -------------------------------------------------------------------------------- /lmbench/src/lib_tcp.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int tcp_server(int prog, int rdwr); 8 | int tcp_done(int prog); 9 | int tcp_accept(int sock, int rdwr); 10 | int tcp_connect(char *host, int prog, int rdwr); 11 | void sock_optimize(int sock, int rdwr); 12 | int sockport(int s); 13 | -------------------------------------------------------------------------------- /lmbench/src/lib_udp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * udp_lib.c - routines for managing UDP connections 3 | * 4 | * %W% %G% 5 | * 6 | * Copyright (c) 1994 Larry McVoy. 7 | */ 8 | #define _LIB /* bench.h needs this */ 9 | #include "bench.h" 10 | 11 | /* 12 | * Get a UDP socket, bind it, figure out the port, 13 | * and advertise the port as program "prog". 14 | * 15 | * XXX - it would be nice if you could advertise ascii strings. 16 | */ 17 | int 18 | udp_server(u_long prog, int rdwr) 19 | { 20 | int sock; 21 | struct sockaddr_in s; 22 | 23 | if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { 24 | perror("socket"); 25 | exit(1); 26 | } 27 | sock_optimize(sock, rdwr); 28 | bzero((void*)&s, sizeof(s)); 29 | s.sin_family = AF_INET; 30 | #ifdef NO_PORTMAPPER 31 | s.sin_port = htons(prog); 32 | #endif 33 | if (bind(sock, (struct sockaddr*)&s, sizeof(s)) < 0) { 34 | perror("bind"); 35 | exit(2); 36 | } 37 | #ifndef NO_PORTMAPPER 38 | (void)pmap_unset(prog, (u_long)1); 39 | if (!pmap_set(prog, (u_long)1, (u_long)IPPROTO_UDP, 40 | (unsigned short)sockport(sock))) { 41 | perror("pmap_set"); 42 | exit(5); 43 | } 44 | #endif 45 | return (sock); 46 | } 47 | 48 | /* 49 | * Unadvertise the socket 50 | */ 51 | void 52 | udp_done(u_long prog) 53 | { 54 | (void)pmap_unset(prog, (u_long)1); 55 | } 56 | 57 | /* 58 | * "Connect" to the UCP socket advertised as "prog" on "host" and 59 | * return the connected socket. 60 | */ 61 | int 62 | udp_connect(char *host, u_long prog, int rdwr) 63 | { 64 | struct hostent *h; 65 | struct sockaddr_in sin; 66 | int sock; 67 | #ifndef NO_PORTMAPPER 68 | u_short port; 69 | #endif 70 | 71 | if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { 72 | perror("socket"); 73 | exit(1); 74 | } 75 | sock_optimize(sock, rdwr); 76 | if (!(h = gethostbyname(host))) { 77 | perror(host); 78 | exit(2); 79 | } 80 | bzero((void *) &sin, sizeof(sin)); 81 | sin.sin_family = AF_INET; 82 | bcopy((void*)h->h_addr, (void *) &sin.sin_addr, h->h_length); 83 | #ifdef NO_PORTMAPPER 84 | sin.sin_port = htons(prog); 85 | #else 86 | port = pmap_getport(&sin, prog, (u_long)1, IPPROTO_UDP); 87 | if (!port) { 88 | perror("lib UDP: No port found"); 89 | exit(3); 90 | } 91 | sin.sin_port = htons(port); 92 | #endif 93 | if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) < 0) { 94 | perror("connect"); 95 | exit(4); 96 | } 97 | return (sock); 98 | } 99 | -------------------------------------------------------------------------------- /lmbench/src/lib_udp.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int udp_server(u_long prog, int rdwr); 8 | void udp_done(u_long prog); 9 | int udp_connect(char *host, u_long prog, int rdwr); 10 | void sock_optimize(int sock, int rdwr); 11 | int sockport(int); 12 | 13 | -------------------------------------------------------------------------------- /lmbench/src/lib_unix.c: -------------------------------------------------------------------------------- 1 | /* 2 | * unix_lib.c - routines for managing UNIX connections. 3 | * 4 | * Positive port/program numbers are RPC ports, negative ones are UNIX ports. 5 | * 6 | * Copyright (c) 1994-1996 Larry McVoy. 7 | */ 8 | #define _LIB /* bench.h needs this */ 9 | #include "bench.h" 10 | 11 | /* 12 | * Get a UNIX socket, bind it. 13 | */ 14 | int 15 | unix_server(char *path) 16 | { 17 | int sock; 18 | struct sockaddr_un s; 19 | 20 | #ifdef LIBUNIX_VERBOSE 21 | fprintf(stderr, "unix_server(%s, %u)\n", prog, rdwr); 22 | #endif 23 | if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { 24 | perror("socket"); 25 | exit(1); 26 | } 27 | bzero((void*)&s, sizeof(s)); 28 | s.sun_family = AF_UNIX; 29 | strcpy(s.sun_path, path); 30 | if (bind(sock, (struct sockaddr*)&s, sizeof(s)) < 0) { 31 | perror("bind"); 32 | exit(2); 33 | } 34 | if (listen(sock, 100) < 0) { 35 | perror("listen"); 36 | exit(4); 37 | } 38 | return (sock); 39 | } 40 | 41 | /* 42 | * Unadvertise the socket 43 | */ 44 | int 45 | unix_done(int sock, char *path) 46 | { 47 | close(sock); 48 | unlink(path); 49 | return (0); 50 | } 51 | 52 | /* 53 | * Accept a connection and return it 54 | */ 55 | int 56 | unix_accept(int sock) 57 | { 58 | struct sockaddr_un s; 59 | int newsock; 60 | socklen_t namelen; 61 | 62 | namelen = sizeof(s); 63 | bzero((void*)&s, namelen); 64 | 65 | retry: 66 | if ((newsock = accept(sock, (struct sockaddr*)&s, &namelen)) < 0) { 67 | if (errno == EINTR) 68 | goto retry; 69 | perror("accept"); 70 | exit(6); 71 | } 72 | return (newsock); 73 | } 74 | 75 | /* 76 | * Connect to the UNIX socket advertised as "path" and 77 | * return the connected socket. 78 | */ 79 | int 80 | unix_connect(char *path) 81 | { 82 | struct sockaddr_un s; 83 | int sock; 84 | 85 | if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { 86 | perror("socket"); 87 | exit(1); 88 | } 89 | bzero((void*)&s, sizeof(s)); 90 | s.sun_family = AF_UNIX; 91 | strcpy(s.sun_path, path); 92 | if (connect(sock, (struct sockaddr*)&s, sizeof(s)) < 0) { 93 | perror("connect"); 94 | exit(4); 95 | } 96 | return (sock); 97 | } 98 | 99 | -------------------------------------------------------------------------------- /lmbench/src/lib_unix.h: -------------------------------------------------------------------------------- 1 | /* lib_unix.c */ 2 | #ifndef _LIB_UNIX_H_ 3 | #define _LIB_UNIX_H_ 4 | int unix_server(char *path); 5 | int unix_done(int sock, char *path); 6 | int unix_accept(int sock); 7 | int unix_connect(char *path); 8 | #endif 9 | -------------------------------------------------------------------------------- /lmbench/src/line.c: -------------------------------------------------------------------------------- 1 | /* 2 | * line.c - guess the cache line size 3 | * 4 | * usage: line 5 | * 6 | * Copyright (c) 2000 Carl Staelin. 7 | * Copyright (c) 1994 Larry McVoy. Distributed under the FSF GPL with 8 | * additional restriction that results may published only if 9 | * (1) the benchmark is unmodified, and 10 | * (2) the version in the sccsid below is included in the report. 11 | * Support for this development by Sun Microsystems is gratefully acknowledged. 12 | */ 13 | char *id = "$Id$\n"; 14 | 15 | #include "bench.h" 16 | 17 | /* 18 | * Assumptions: 19 | * 20 | * 1) Cache lines are a multiple of pointer-size words 21 | * 2) Cache lines are no larger than 1/4 a page size 22 | * 3) Pages are an even multiple of cache lines 23 | */ 24 | int 25 | main(int ac, char **av) 26 | { 27 | int l; 28 | int verbose = 0; 29 | int warmup = 0; 30 | int repetitions = (1000000 <= get_enough(0) ? 1 : TRIES); 31 | int c; 32 | size_t maxlen = 64 * 1024 * 1024; 33 | struct mem_state state; 34 | char *usage = "[-v] [-W ] [-N ][-M len[K|M]]\n"; 35 | 36 | state.line = sizeof(char*); 37 | state.pagesize = getpagesize(); 38 | 39 | while (( c = getopt(ac, av, "avM:W:N:")) != EOF) { 40 | switch(c) { 41 | case 'v': 42 | verbose = 1; 43 | break; 44 | case 'M': 45 | maxlen = bytes(optarg); 46 | break; 47 | case 'W': 48 | warmup = atoi(optarg); 49 | break; 50 | case 'N': 51 | repetitions = atoi(optarg); 52 | break; 53 | default: 54 | lmbench_usage(ac, av, usage); 55 | break; 56 | } 57 | } 58 | 59 | if ((l = line_find(maxlen, warmup, repetitions, &state)) > 0) { 60 | if (verbose) { 61 | printf("cache line size: %d bytes\n", l); 62 | } else { 63 | printf("%d\n", l); 64 | } 65 | } 66 | 67 | return (0); 68 | } 69 | -------------------------------------------------------------------------------- /lmbench/src/loop_o.c: -------------------------------------------------------------------------------- 1 | #include "bench.h" 2 | 3 | int 4 | main() 5 | { 6 | printf("%.8f\n", l_overhead()); 7 | return (0); 8 | } 9 | -------------------------------------------------------------------------------- /lmbench/src/msleep.c: -------------------------------------------------------------------------------- 1 | #include "bench.h" 2 | 3 | int 4 | main(int ac, char **av) 5 | { 6 | #if defined(sgi) || defined(sun) || defined(linux) 7 | usleep(atoi(av[1]) * 1000); 8 | return (0); 9 | #else 10 | fd_set set; 11 | int fd; 12 | struct timeval tv; 13 | 14 | tv.tv_sec = 0; 15 | tv.tv_usec = atoi(av[1]) * 1000; 16 | FD_ZERO(&set); 17 | FD_SET(0, &set); 18 | select(1, &set, 0, 0, &tv); 19 | return (0); 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /lmbench/src/par_mem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * par_mem.c - determine the memory hierarchy parallelism 3 | * 4 | * usage: par_mem [-L ] [-M len[K|M]] [-W ] [-N ] 5 | * 6 | * Copyright (c) 2000 Carl Staelin. 7 | * Copyright (c) 1994 Larry McVoy. Distributed under the FSF GPL with 8 | * additional restriction that results may published only if 9 | * (1) the benchmark is unmodified, and 10 | * (2) the version in the sccsid below is included in the report. 11 | * Support for this development by Sun Microsystems is gratefully acknowledged. 12 | */ 13 | char *id = "$Id$\n"; 14 | 15 | #include "bench.h" 16 | 17 | void compute_times(struct mem_state* state, double* tlb_time, double* cache_time); 18 | 19 | 20 | /* 21 | * Assumptions: 22 | * 23 | * 1) Cache lines are a multiple of pointer-size words 24 | * 2) Cache lines are no larger than 1/8 of a page (typically 512 bytes) 25 | * 3) Pages are an even multiple of cache lines 26 | */ 27 | int 28 | main(int ac, char **av) 29 | { 30 | int i; 31 | int c; 32 | int warmup = 0; 33 | int repetitions = (1000000 <= get_enough(0) ? 1 : TRIES); 34 | size_t maxlen = 64 * 1024 * 1024; 35 | double par; 36 | struct mem_state state; 37 | char *usage = "[-L ] [-M len[K|M]] [-W ] [-N ]\n"; 38 | 39 | state.line = getpagesize() / 16; 40 | state.pagesize = getpagesize(); 41 | 42 | while (( c = getopt(ac, av, "L:M:W:N:")) != EOF) { 43 | switch(c) { 44 | case 'L': 45 | state.line = atoi(optarg); 46 | if (state.line < sizeof(char*)) 47 | state.line = sizeof(char*); 48 | break; 49 | case 'M': 50 | maxlen = bytes(optarg); 51 | break; 52 | case 'W': 53 | warmup = atoi(optarg); 54 | break; 55 | case 'N': 56 | repetitions = atoi(optarg); 57 | break; 58 | default: 59 | lmbench_usage(ac, av, usage); 60 | break; 61 | } 62 | } 63 | 64 | for (i = MAX_MEM_PARALLELISM * state.line; i <= maxlen; i<<=1) { 65 | par = par_mem(i, warmup, repetitions, &state); 66 | 67 | if (par > 0.) { 68 | fprintf(stderr, "%.6f %.2f\n", 69 | i / (1000. * 1000.), par); 70 | } 71 | } 72 | 73 | exit(0); 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /lmbench/src/rhttp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rhttp.c - simple HTTP transaction latency test 3 | * 4 | * usage: rhttp hostname [port] remote-clients -p file file 5 | * 6 | * This turns into a bunch of 7 | * rsh remote http hostname file file file [port] 8 | * with the results aggragated and reported. 9 | * 10 | * The program "http" must be in your path on the remote machine. 11 | * 12 | * XXX - the way this should work is like so: 13 | * parent process reading file names from stdin 14 | * multiple child processes connected to the parent process 15 | * while more file names 16 | * wait for a child process to be idle 17 | * feed it ~10 filenames 18 | * the child processes need to be able to tell the parent that they 19 | * want more work. They also need to pass back the results. 20 | * 21 | * Copyright (c) 1994-1997 Larry McVoy. Distributed under the FSF GPL with 22 | * additional restriction that results may published only if 23 | * (1) the benchmark is unmodified, and 24 | * (2) the version in the sccsid below is included in the report. 25 | * Support for this development by Silicon Graphics is gratefully acknowledged. 26 | */ 27 | char *id = "$Id$\n"; 28 | 29 | #include "bench.h" 30 | 31 | int 32 | main(int ac, char **av) 33 | { 34 | char *name = av[0], *server, *prog; 35 | int i, j; 36 | uint64 total = 0; 37 | uint64 usecs = 0; 38 | char *args[1024]; 39 | 40 | if (ac < 5) { 41 | usage: fprintf(stderr, 42 | "Usage: %s hostname [port] remote-clients -p file ...\n", 43 | name); 44 | exit(1); 45 | } 46 | server = av[1]; 47 | av++, ac--; /* eat server */ 48 | if (atoi(av[1]) != 0) { 49 | prog = av[1]; 50 | av++, ac--; /* eat port */ 51 | } else { 52 | prog = "80"; /* http */ 53 | } 54 | for (i = 1; i < ac; ++i) { 55 | if (!strcmp("-p", av[i])) { 56 | i++; 57 | break; 58 | } 59 | } 60 | args[0] = "rsh"; 61 | args[2] = "http"; 62 | args[3] = server; 63 | j = 4; 64 | while (i < ac) { 65 | args[j++] = av[i++]; 66 | } 67 | args[j++] = prog; 68 | args[j] = 0; 69 | for (i = 1; i < ac; ++i) { 70 | if (!strcmp("-p", av[i])) { 71 | break; 72 | } 73 | args[1] = av[i]; 74 | for (j = 0; args[j]; j++) { 75 | printf("%s ", args[j]); 76 | } 77 | printf("\n"); 78 | if (fork() == 0) { 79 | char name[30]; 80 | 81 | sprintf(name, "/tmp/rhttp%d", i); 82 | creat(name, 0666); 83 | close(2); 84 | dup(1); 85 | execvp(args[0], args); 86 | perror(args[0]); 87 | exit(1); 88 | } 89 | } 90 | for (i = 1; i < ac; ++i) { 91 | if (!strcmp("-p", av[i])) { 92 | break; 93 | } 94 | wait(0); 95 | } 96 | system("cat /tmp/rhttp*; rm /tmp/rhttp*"); 97 | exit(1); 98 | for (i = 1; i < ac; ++i) { 99 | int fd, n, m = 0; 100 | float f1 = 0, f2 = 0; 101 | char buf[30]; 102 | 103 | if (!strcmp("-p", av[i])) { 104 | break; 105 | } 106 | sprintf(buf, "/tmp/http%d", i); 107 | fd = open(buf, 0); 108 | unlink(buf); 109 | /* 110 | * Avg xfer: 3.9KB, 235.0KB in 2038 millisecs, 115.31 KB/sec 111 | */ 112 | n = read(fd, buf, XFERSIZE); 113 | buf[n] = 0; 114 | sscanf(buf, "Avg xfer: %fKB, %fKB in %d millisecs,", 115 | &f1, &f2, &m); 116 | if (m > usecs) { 117 | usecs = m; 118 | } 119 | total += f2; 120 | } 121 | total <<= 10; 122 | usecs *= 1000; 123 | settime(usecs); 124 | latency((uint64)1, total); 125 | } 126 | -------------------------------------------------------------------------------- /lmbench/src/seek.c: -------------------------------------------------------------------------------- 1 | char *id = "$Id$\n"; 2 | /* 3 | * Seek - calculate seeks as a function of distance. 4 | * 5 | * Usage: seek file size 6 | * 7 | * Copyright (c) 1994,1995,1996 Larry McVoy. All rights reserved. 8 | */ 9 | 10 | #include "bench.h" 11 | 12 | #define STRIDE 1024*1024 13 | 14 | main(ac, av) 15 | int ac; 16 | char *av[]; 17 | { 18 | char buf[512]; 19 | int disk; 20 | off64_t size; 21 | off64_t begin, end; 22 | int usecs; 23 | 24 | if (ac != 3) { 25 | exit(1); 26 | } 27 | if ((disk = open(av[1], 0)) == -1) { 28 | exit(1); 29 | } 30 | size = bytes(av[2]); 31 | 32 | /* 33 | * We flip back and forth, in strides of 1MB. 34 | * If we have a 100MB disk, that means we do 35 | * 1, 99, 2, 98, etc. 36 | */ 37 | end = size; 38 | begin = 0; 39 | seekto(disk, begin, SEEK_SET); 40 | read(disk, buf, sizeof(buf)); 41 | while (end > begin) { 42 | end -= STRIDE; 43 | start(); 44 | seekto(disk, end, SEEK_SET); 45 | read(disk, buf, sizeof(buf)); 46 | usecs = stop(); 47 | printf("%.04f %.04f\n", (end - begin) / 1000000., usecs/1000.); 48 | 49 | begin += STRIDE; 50 | start(); 51 | seekto(disk, begin, SEEK_SET); 52 | read(disk, buf, sizeof(buf)); 53 | usecs = stop(); 54 | printf("%.04f %.04f\n", (end - begin) / 1000000., usecs/1000.); 55 | } 56 | exit(0); 57 | } 58 | -------------------------------------------------------------------------------- /lmbench/src/stats.h: -------------------------------------------------------------------------------- 1 | #ifndef _STATS_H 2 | #define _STATS_H 3 | 4 | #include "bench.h" 5 | #include "timing.h" 6 | 7 | #define ABS(x) ((x) < 0 ? -(x) : (x)) 8 | 9 | int int_compare(const void *a, const void *b); 10 | int uint64_compare(const void *a, const void *b); 11 | int double_compare(const void *a, const void *b); 12 | 13 | typedef int (*int_stat)(int *values, int size); 14 | typedef uint64 (*uint64_stat)(uint64 *values, int size); 15 | typedef double (*double_stat)(double *values, int size); 16 | 17 | int int_median(int *values, int size); 18 | uint64 uint64_median(uint64 *values, int size); 19 | double double_median(double *values, int size); 20 | 21 | int int_mean(int *values, int size); 22 | uint64 uint64_mean(uint64 *values, int size); 23 | double double_mean(double *values, int size); 24 | 25 | int int_min(int *values, int size); 26 | uint64 uint64_min(uint64 *values, int size); 27 | double double_min(double *values, int size); 28 | 29 | int int_max(int *values, int size); 30 | uint64 uint64_max(uint64 *values, int size); 31 | double double_max(double *values, int size); 32 | 33 | double int_variance(int *values, int size); 34 | double uint64_variance(uint64 *values, int size); 35 | double double_variance(double *values, int size); 36 | 37 | double int_moment(int moment, int *values, int size); 38 | double uint64_moment(int moment, uint64 *values, int size); 39 | double double_moment(int moment, double *values, int size); 40 | 41 | double int_stderr(int *values, int size); 42 | double uint64_stderr(uint64 *values, int size); 43 | double double_stderr(double *values, int size); 44 | 45 | double int_skew(int *values, int size); 46 | double uint64_skew(uint64 *values, int size); 47 | double double_skew(double *values, int size); 48 | 49 | double int_kurtosis(int *values, int size); 50 | double uint64_kurtosis(uint64 *values, int size); 51 | double double_kurtosis(double *values, int size); 52 | 53 | double int_bootstrap_stderr(int *values, int size, int_stat f); 54 | double uint64_bootstrap_stderr(uint64 *values, int size, uint64_stat f); 55 | double double_bootstrap_stderr(double *values, int size, double_stat f); 56 | 57 | void regression(double *x, double *y, double *sig, int n, 58 | double *a, double *b, double *sig_a, double *sig_b, 59 | double *chi2); 60 | 61 | #endif /* _STATS_H */ 62 | -------------------------------------------------------------------------------- /lmbench/src/timing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id$ 3 | */ 4 | #ifndef _TIMING_H 5 | #define _TIMING_H 6 | 7 | char *p64(uint64 big); 8 | char *p64sz(uint64 big); 9 | double Delta(void); 10 | double Now(void); 11 | void adjust(int usec); 12 | void bandwidth(uint64 bytes, uint64 times, int verbose); 13 | uint64 bytes(char *s); 14 | void context(uint64 xfers); 15 | uint64 delta(void); 16 | int get_enough(int); 17 | uint64 get_n(void); 18 | void kb(uint64 bytes); 19 | double l_overhead(void); 20 | char last(char *s); 21 | void latency(uint64 xfers, uint64 size); 22 | void mb(uint64 bytes); 23 | void micro(char *s, uint64 n); 24 | void micromb(uint64 mb, uint64 n); 25 | void milli(char *s, uint64 n); 26 | void morefds(void); 27 | void nano(char *s, uint64 n); 28 | uint64 now(void); 29 | void ptime(uint64 n); 30 | void rusage(void); 31 | void save_n(uint64); 32 | void settime(uint64 usecs); 33 | void start(struct timeval *tv); 34 | uint64 stop(struct timeval *begin, struct timeval *end); 35 | uint64 t_overhead(void); 36 | double timespent(void); 37 | void timing(FILE *out); 38 | uint64 tvdelta(struct timeval *, struct timeval *); 39 | void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0); 40 | void use_int(int result); 41 | void use_pointer(void *result); 42 | uint64 usecs_spent(void); 43 | void touch(char *buf, size_t size); 44 | size_t* permutation(size_t max, size_t scale); 45 | int cp(char* src, char* dst, mode_t mode); 46 | long bread(void* src, long count); 47 | 48 | #if defined(hpux) || defined(__hpux) 49 | int getpagesize(); 50 | #endif 51 | 52 | #endif /* _TIMING_H */ 53 | -------------------------------------------------------------------------------- /lmbench/src/timing_o.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "bench.h" 3 | 4 | int 5 | main() 6 | { 7 | putenv("LOOP_O=0.0"); 8 | printf("%lu\n", (unsigned long)t_overhead()); 9 | return (0); 10 | } 11 | -------------------------------------------------------------------------------- /lmbench/src/version.h: -------------------------------------------------------------------------------- 1 | #define MAJOR 3 2 | #define MINOR -9 /* negative is alpha, it "increases" */ 3 | -------------------------------------------------------------------------------- /lmbench/src/webpage-lm.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/lmbench/src/webpage-lm.tar -------------------------------------------------------------------------------- /pi_css5_src/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for pi_fftcs5, Takuyo Ooura's # Pi calculation for *nix or DOS 2 | # Warning: this file has tabs in it. It is required for GNU Make. 3 | # 4 | # This version may not produce optimal runs. You'll need to experiment 5 | # with the compiler options. 6 | 7 | #Set this to your remove command. 8 | RM= rm -f 9 | 10 | #Set this to your copy command. 11 | CP= cp 12 | 13 | #Set this to you directory creation command 14 | MKDIR= mkdir -p 15 | 16 | #Set this to your strip command. 17 | STRIP= strip 18 | 19 | #Set this to the proper math libraries to link against 20 | MATH_LIBS= -lm 21 | 22 | #Set this to the proper install directory 23 | PREFIX= /usr/local 24 | 25 | #CC = gcc 26 | CC = /home/hexiongjun/SmartAuto/prebuilt/toolchains/arm-fsl-linux-gnueabi/4.6.2/bin/arm-fsl-linux-gnueabi-gcc 27 | 28 | #Set this to best optimization flags for your system. Defaults are for gcc. 29 | CFLAGS = -Wall -pedantic -O -fomit-frame-pointer -funroll-loops -march=armv7-a -mfpu=neon -mfloat-abi=softfp 30 | 31 | #Set this to the cpu to target 32 | #CFLAGS += -march=i686 -malign-double 33 | 34 | #If you would like to minimize program output uncomment this line 35 | #CFLAGS += -DQUIET_OUT 36 | 37 | #Set this to important linker flags 38 | LDFLAGS = -static 39 | 40 | # Leave items below this point unchanged! 41 | 42 | all: pi_css5 43 | 44 | 45 | pi_css5 : pi_fftcs.o fftsg_h.o 46 | $(CC) $(CFLAGS) pi_fftcs.o fftsg_h.o ${MATH_LIBS} ${LDFLAGS} -o pi_css5 47 | 48 | pi_fftcs.o : pi_fftcs.c 49 | $(CC) $(CFLAGS) -c pi_fftcs.c -o pi_fftcs.o 50 | 51 | fftsg_h.o : fftsg_h.c 52 | $(CC) $(CFLAGS) -c fftsg_h.c -o fftsg_h.o 53 | 54 | 55 | install: all 56 | ${MKDIR} ${PREFIX}/bin 57 | ${CP} pi_css5 ${PREFIX}/bin 58 | 59 | install-strip: strip install 60 | 61 | strip: all 62 | ${STRIP} pi_css5 63 | 64 | clean: 65 | ${RM} pi_fftcs.o fftsg_h.o pi_css5 66 | 67 | -------------------------------------------------------------------------------- /pi_css5_src/install.txt: -------------------------------------------------------------------------------- 1 | PI(= 3.1415926535897932384626...) Calculation Program 2 | 3 | 4 | ver. LG1.1.2-MP1.5.2a Nov. 1999 5 | modified easier usage, May 2006 6 | 7 | If you have a C compiler installed, simply edit the makefile and build with: 8 | 9 | make all 10 | 11 | 12 | Copyright 13 | source files: 14 | Original Copyright(C) 1999 Takuya OOURA 15 | Email: ooura@mmm.t.u-tokyo.ac.jp 16 | URL: http://momonga.t.u-tokyo.ac.jp/~ooura/fft.html 17 | You may use, copy, modify this code for any purpose and 18 | without fee. You may distribute this ORIGINAL package. 19 | 20 | 21 | Modifications Copyright(C) 2004, 2006 Dara Hazeghi 22 | Email: dhazeghi@yahoo.com 23 | URL: http://www.myownlittleworld.com/miscellaenous/computers/piprogram.html 24 | This package may be freely redistributed or modified 25 | in accordance with its original license. 26 | -------------------------------------------------------------------------------- /pi_css5_src/pi_css5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/pi_css5_src/pi_css5 -------------------------------------------------------------------------------- /pi_css5_src/readme.txt: -------------------------------------------------------------------------------- 1 | PI(= 3.1415926535897932384626...) Calculation Program 2 | 3 | 4 | ver. LG1.1.2-MP1.5.2a Nov. 1999 5 | 6 | 7 | Files: 8 | fftsg_h.c : FFT Package - split-radix - use no work areas 9 | pi_fftcs.c : PI Calculation Program - memory save version 10 | -- use rdft() in "fft*g_h.c" 11 | readme.txt : this file 12 | Makefile : - for gcc modify for your own compiler. 13 | 14 | To Compile: 15 | Check macros in "pi_fftcs.c" and modify if necessary. 16 | DBL_ERROR_MARGIN is very impotant parameter. 17 | If DBL_ERROR_MARGIN is very small then efficiency will be bad. 18 | If DBL_ERROR_MARGIN >= 0.5 then it may calculate a wrong result. 19 | 20 | Example Compilation: 21 | GNU: 22 | gcc -O -funroll-loops -fomit-frame-pointer pi_fftcs.c fftsg_h.c -lm -o pi_css5 23 | SUN: 24 | cc -fast pi_fftcs.c fftsg_h.c -lm -o pi_css5 25 | HP: 26 | aCC -fast pi_fftcs.c fftsg_h.c -lm -o pi_css5 27 | Microsoft: 28 | cl -O2 pi_fftcs.c fftsg_h.c -o pi_css5 29 | 30 | Relationship between Number of Digits and FFT Length: 31 | ndigit = nfft*log_10(R), R >= 10000 or 1000 32 | R is a radix of multiple-precision format. 33 | R depends on DBL_ERROR_MARGIN and 34 | FFT+machine+compiler's tolerance. 35 | 36 | Number of Floating Point Operations: 37 | pi_fftcs.c + fftsg_h.c: 38 | 42*nfft*(log_2(nfft))^2 [Operations] 39 | 40 | Memory Use: 41 | pi_fftcs.c: 42 | nfft*(6*sizeof(short int)+3*sizeof(double)) [Bytes] 43 | 44 | AGM Algorithm: 45 | ---- a formula based on the AGM (Arithmetic-Geometric Mean) ---- 46 | c = sqrt(0.125); 47 | a = 1 + 3 * c; 48 | b = sqrt(a); 49 | e = b - 0.625; 50 | b = 2 * b; 51 | c = e - c; 52 | a = a + e; 53 | npow = 4; 54 | do { 55 | npow = 2 * npow; 56 | e = (a + b) / 2; 57 | b = sqrt(a * b); 58 | e = e - b; 59 | b = 2 * b; 60 | c = c - e; 61 | a = e + b; 62 | } while (e > SQRT_SQRT_EPSILON); 63 | e = e * e / 4; 64 | a = a + b; 65 | pi = (a * a - e - e / 2) / (a * c - e) / npow; 66 | ---- modification ---- 67 | This is a modified version of Gauss-Legendre formula 68 | (by T.Ooura). It is faster than original version. 69 | 70 | Reference: 71 | 1. E.Salamin, 72 | Computation of PI Using Arithmetic-Geometric Mean, 73 | Mathematics of Computation, Vol.30 1976. 74 | 2. R.P.Brent, 75 | Fast Multiple-Precision Evaluation of Elementary Functions, 76 | J. ACM 23 1976. 77 | 3. D.Takahasi, Y.Kanada, 78 | Calculation of PI to 51.5 Billion Decimal Digits on 79 | Distributed Memoriy Parallel Processors, 80 | Transactions of Information Processing Society of Japan, 81 | Vol.39 No.7 1998. 82 | 4. T.Ooura, 83 | Improvement of the PI Calculation Algorithm and 84 | Implementation of Fast Multiple-Precision Computation, 85 | Information Processing Society of Japan SIG Notes, 86 | 98-HPC-74, 1998. 87 | 88 | 89 | Copyright 90 | source files: 91 | Copyright(C) 1999 Takuya OOURA 92 | Email: ooura@mmm.t.u-tokyo.ac.jp 93 | URL: http://momonga.t.u-tokyo.ac.jp/~ooura/fft.html 94 | You may use, copy, modify this code for any purpose and 95 | without fee. You may distribute this ORIGINAL package. 96 | 97 | -------------------------------------------------------------------------------- /whetstone/mk.sh: -------------------------------------------------------------------------------- 1 | /home/hexiongjun/SmartAuto/prebuilt/toolchains/arm-fsl-linux-gnueabi/4.6.2/bin/arm-fsl-linux-gnueabi-gcc -lm -march=armv7-a -mfloat-abi=softfp -mfpu=neon -o whetston whetstone.c 2 | -------------------------------------------------------------------------------- /whetstone/whetston: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyho/ARM_BenchMark/f0da3378728d77c8eb6ad444b645cf7fe28d6d6b/whetstone/whetston --------------------------------------------------------------------------------