Created
December 28, 2014 19:26
-
-
Save ryanmr/f8843bd13b914d98d608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
Profile data file 'callgrind.out.23136' (creator: callgrind-3.8.1) | |
-------------------------------------------------------------------------------- | |
I1 cache: | |
D1 cache: | |
LL cache: | |
Timerange: Basic block 0 - 273612 | |
Trigger: Program termination | |
Profiled target: ./game (PID 23136, part 1) | |
Events recorded: Ir | |
Events shown: Ir | |
Event sort order: Ir | |
Thresholds: 99 | |
Include dirs: | |
User annotated: | |
Auto-annotation: on | |
-------------------------------------------------------------------------------- | |
Ir | |
-------------------------------------------------------------------------------- | |
1,354,434 PROGRAM TOTALS | |
-------------------------------------------------------------------------------- | |
Ir file:function | |
-------------------------------------------------------------------------------- | |
93,591 /build/buildd/eglibc-2.17/elf/dl-lookup.c:do_lookup_x [/lib/x86_64-linux-gnu/ld-2.17.so] | |
67,579 /build/buildd/eglibc-2.17/stdio-common/vfscanf.c:_IO_vfscanf [/lib/x86_64-linux-gnu/libc-2.17.so] | |
58,209 /build/buildd/eglibc-2.17/elf/dl-addr.c:_dl_addr [/lib/x86_64-linux-gnu/libc-2.17.so] | |
53,210 ???:vec::Vec$LT$T$GT$::remove::h5640987603050366185 [/home/ryan/class/rust/wargame-rust/target/game] | |
41,592 /build/buildd/eglibc-2.17/elf/dl-lookup.c:_dl_lookup_symbol_x [/lib/x86_64-linux-gnu/ld-2.17.so] | |
35,012 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../strcmp.S:strcmp'2 [/lib/x86_64-linux-gnu/ld-2.17.so] | |
33,627 ???:mem::transmute_copy::h567819363120629838 [/home/ryan/class/rust/wargame-rust/target/game] | |
32,934 /build/buildd/eglibc-2.17/stdlib/../stdlib/strtol_l.c:____strtoul_l_internal [/lib/x86_64-linux-gnu/libc-2.17.so] | |
30,442 /build/buildd/eglibc-2.17/string/../string/memmove.c:__GI_memmove [/lib/x86_64-linux-gnu/libc-2.17.so] | |
29,422 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa [/home/ryan/class/rust/wargame-rust/target/game] | |
28,864 ???:vec::Vec$LT$T$GT$::push::h13811101999849887939 [/home/ryan/class/rust/wargame-rust/target/game] | |
27,786 /build/buildd/eglibc-2.17/elf/../sysdeps/x86_64/dl-machine.h:_dl_relocate_object | |
23,602 /build/buildd/eglibc-2.17/string/wordcopy.c:_wordcopy_fwd_dest_aligned [/lib/x86_64-linux-gnu/libc-2.17.so] | |
22,536 ???:ptr::_$RP$mut$u{20}T.RawPtr$LT$T$GT$::offset::h1985977095670095555 [/home/ryan/class/rust/wargame-rust/target/game] | |
18,690 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card::get_value::h9912705a0aa32caehga [/home/ryan/class/rust/wargame-rust/target/game] | |
18,502 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::game::h364c968c6eea8169zra [/home/ryan/class/rust/wargame-rust/target/game] | |
18,342 ???:raw::Repr::repr::h14935654526177803106 [/home/ryan/class/rust/wargame-rust/target/game] | |
18,215 ???:iter::Range$LT$A$GT$.Iterator$LT$A$GT$::next::h4141019300653566686 [/home/ryan/class/rust/wargame-rust/target/game] | |
17,658 ???:cmp::impls::uint.PartialOrd::lt::h2f8e536a1ecb0104a5i [/home/ryan/class/rust/wargame-rust/target/game] | |
17,271 /build/buildd/eglibc-2.17/elf/dl-misc.c:_dl_name_match_p [/lib/x86_64-linux-gnu/ld-2.17.so] | |
16,644 ???:je_arena_malloc_small [/home/ryan/class/rust/wargame-rust/target/game] | |
16,290 ???:ptr::_$RP$const$u{20}T.RawPtr$LT$T$GT$::offset::h15334059942184268521 [/home/ryan/class/rust/wargame-rust/target/game] | |
15,662 ???:je_arena_dalloc_bin_locked [/home/ryan/class/rust/wargame-rust/target/game] | |
15,279 /build/buildd/eglibc-2.17/elf/do-rel.h:_dl_relocate_object | |
14,940 ???:vec::Vec$LT$T$GT$::as_mut_slice::h1039610149892998033 [/home/ryan/class/rust/wargame-rust/target/game] | |
13,772 ???:vec::Vec$LT$T$GT$.ops..DerefMut$LT$$u{5b}T$u{5d}$GT$::deref_mut::h16023025041741461523 [/home/ryan/class/rust/wargame-rust/target/game] | |
13,146 ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::as_mut_ptr::h8178630268797561111 [/home/ryan/class/rust/wargame-rust/target/game] | |
12,672 ???:ptr::write::h1513642521744101627 [/home/ryan/class/rust/wargame-rust/target/game] | |
12,636 ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::swap::h11715971651488417237 [/home/ryan/class/rust/wargame-rust/target/game] | |
12,190 ???:je_mallocx [/home/ryan/class/rust/wargame-rust/target/game] | |
11,487 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../strcmp.S:strcmp [/lib/x86_64-linux-gnu/ld-2.17.so] | |
11,385 ???:vec::Vec$LT$T$GT$::len::h4231617977691762399 [/home/ryan/class/rust/wargame-rust/target/game] | |
10,935 ???:rand::TaskRng.Rng::next_u64::h0eb9a74cfe8cea0dIqm [/home/ryan/class/rust/wargame-rust/target/game] | |
10,206 ???:distributions::range::uint.SampleRange::sample_range::h2545018744886712066 [/home/ryan/class/rust/wargame-rust/target/game] | |
9,597 ???:mem::size_of::h2229085280399886453 [/home/ryan/class/rust/wargame-rust/target/game] | |
9,470 ???:mem::uninitialized::h14363733860426975471 [/home/ryan/class/rust/wargame-rust/target/game] | |
9,443 ???:je_sdallocx [/home/ryan/class/rust/wargame-rust/target/game] | |
9,209 /build/buildd/eglibc-2.17/elf/dl-lookup.c:check_match.9346 [/lib/x86_64-linux-gnu/ld-2.17.so] | |
8,991 ???:ptr::swap::h995138873609317387 [/home/ryan/class/rust/wargame-rust/target/game] | |
8,951 /build/buildd/eglibc-2.17/nptl/pthread_mutex_lock.c:pthread_mutex_lock [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
8,493 ???:Rng::shuffle::h11180652618550122827 [/home/ryan/class/rust/wargame-rust/target/game] | |
8,460 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memcpy.S:__GI_memcpy [/lib/x86_64-linux-gnu/libc-2.17.so] | |
8,372 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Suit...std..clone..Clone::clone::hc79edb73a18e4d2dtda [/home/ryan/class/rust/wargame-rust/target/game] | |
8,304 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Value...std..clone..Clone::clone::h576f0446e360e6dbBaa [/home/ryan/class/rust/wargame-rust/target/game] | |
8,180 ???:vec::Vec$LT$T$GT$.AsSlice$LT$T$GT$::as_slice::h1580279639222791200 [/home/ryan/class/rust/wargame-rust/target/game] | |
8,138 ???:vec::Vec$LT$T$GT$::set_len::h9692553029485302403 [/home/ryan/class/rust/wargame-rust/target/game] | |
7,800 ???:vec::Vec$LT$T$GT$.Index$LT$uint$C$$u{20}T$GT$::index::h7326617153303211307 [/home/ryan/class/rust/wargame-rust/target/game] | |
7,503 ???:vec::Vec$LT$T$GT$::with_capacity::h1674525608498800858 [/home/ryan/class/rust/wargame-rust/target/game] | |
7,290 ???:Rng::gen_range::h200440821053439420 [/home/ryan/class/rust/wargame-rust/target/game] | |
7,290 ???:distributions::range::Range$LT$X$GT$::new::h4092522719279733997 [/home/ryan/class/rust/wargame-rust/target/game] | |
7,242 ???:vec::Vec$LT$T$GT$.Drop::drop::h11163598321942273248 [/home/ryan/class/rust/wargame-rust/target/game] | |
7,133 ???:mem::uninitialized::h8366989492163117478 [/home/ryan/class/rust/wargame-rust/target/game] | |
6,823 ???:je_p2rz [/home/ryan/class/rust/wargame-rust/target/game] | |
6,804 /build/buildd/eglibc-2.17/nptl/pthread_mutex_unlock.c:__pthread_mutex_unlock_usercnt [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
6,530 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memset.S:__memset_x86_64 [/lib/x86_64-linux-gnu/libc-2.17.so] | |
6,027 ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::iter::h8091927885222683084 [/home/ryan/class/rust/wargame-rust/target/game] | |
5,720 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card...std..clone..Clone::clone::h0cf76ceceb78230cvfa [/home/ryan/class/rust/wargame-rust/target/game] | |
5,719 ???:je_arena_dalloc_small [/home/ryan/class/rust/wargame-rust/target/game] | |
5,413 ???:isaac::Isaac64Rng::init::hddbb9b8c5c5b9e46tRb [/home/ryan/class/rust/wargame-rust/target/game] | |
5,196 /build/buildd/eglibc-2.17/libio/iogetdelim.c:getdelim [/lib/x86_64-linux-gnu/libc-2.17.so] | |
5,124 ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::len::h12471567412027932526 [/home/ryan/class/rust/wargame-rust/target/game] | |
5,082 ???:cell::UnsafeCell$LT$T$GT$::get::h3222406558140481250 [/home/ryan/class/rust/wargame-rust/target/game] | |
5,082 ???:rc::RcBoxPtr::strong::h1056756133415440791 [/home/ryan/class/rust/wargame-rust/target/game] | |
4,860 ???:rand_impls::uint.Rand::rand::h9487957468696539872 [/home/ryan/class/rust/wargame-rust/target/game] | |
4,860 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.Ord::cmp::h8bcdd834e10ca1d6Aja [/home/ryan/class/rust/wargame-rust/target/game] | |
4,768 /build/buildd/eglibc-2.17/elf/dl-version.c:_dl_check_map_versions [/lib/x86_64-linux-gnu/ld-2.17.so] | |
4,748 /build/buildd/eglibc-2.17/elf/../elf/dl-runtime.c:_dl_fixup [/lib/x86_64-linux-gnu/ld-2.17.so] | |
4,745 ???:ops::uint.Add$LT$uint$C$$u{20}uint$GT$::add::h7cc805aecfd1dedduFh [/home/ryan/class/rust/wargame-rust/target/game] | |
4,634 /build/buildd/eglibc-2.17/elf/dl-cache.c:_dl_cache_libcmp [/lib/x86_64-linux-gnu/ld-2.17.so] | |
4,598 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::has_cards::h443713a1d94e92baTna [/home/ryan/class/rust/wargame-rust/target/game] | |
4,342 ???:je_tcache_get_hard [/home/ryan/class/rust/wargame-rust/target/game] | |
4,160 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::get_card::h9068ef598095c63dcoa [/home/ryan/class/rust/wargame-rust/target/game] | |
4,139 /build/buildd/eglibc-2.17/elf/dl-deps.c:_dl_map_object_deps [/lib/x86_64-linux-gnu/ld-2.17.so] | |
4,059 ???:heap::imp::deallocate::h93b8806cb9a601070ha [/home/ryan/class/rust/wargame-rust/target/game] | |
4,032 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/memchr.S:memchr [/lib/x86_64-linux-gnu/libc-2.17.so] | |
4,018 ???:isaac::Isaac64Rng::isaac64::h7fe3ad8123751074E6b [/home/ryan/class/rust/wargame-rust/target/game] | |
4,015 ???:clone::uint.Clone::clone::hca661204bd7b38d9INj [/home/ryan/class/rust/wargame-rust/target/game] | |
3,993 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::new::hb3494e84bfef0d9eQla [/home/ryan/class/rust/wargame-rust/target/game] | |
3,988 /build/buildd/eglibc-2.17/elf/dl-load.c:_dl_map_object_from_fd [/lib/x86_64-linux-gnu/ld-2.17.so] | |
3,963 ???:slice::Iter$LT$$u{27}a$C$$u{20}T$GT$.Iterator$LT$$BP$$u{27}a$u{20}T$GT$::next::h8695366112905022528 [/home/ryan/class/rust/wargame-rust/target/game] | |
3,888 ???:distributions::range::uint.SampleRange::construct_range::h85118fffe31db79fOta [/home/ryan/class/rust/wargame-rust/target/game] | |
3,813 ???:option::Option$LT$T$GT$::expect::h16595662119889744246 [/home/ryan/class/rust/wargame-rust/target/game] | |
3,813 ???:heap::imp::allocate::h0a3a29323cfea5651fa [/home/ryan/class/rust/wargame-rust/target/game] | |
3,766 ???:rand::task_rng::h4fa5c903697b0f92lnm [/home/ryan/class/rust/wargame-rust/target/game] | |
3,690 ???:vec::dealloc::h16394306548791827382 [/home/ryan/class/rust/wargame-rust/target/game] | |
3,630 ???:rc::RcBoxPtr::dec_strong::h6873687258687502288 [/home/ryan/class/rust/wargame-rust/target/game] | |
3,584 /build/buildd/eglibc-2.17/libio/genops.c:_IO_sputbackc [/lib/x86_64-linux-gnu/libc-2.17.so] | |
3,567 ???:num::uint.Int::checked_mul::h25cd4c684f053668jib [/home/ryan/class/rust/wargame-rust/target/game] | |
3,389 /build/buildd/eglibc-2.17/elf/dl-load.c:_dl_map_object [/lib/x86_64-linux-gnu/ld-2.17.so] | |
3,388 ???:cell::Cell$LT$T$GT$::get::h17911452216172803149 [/home/ryan/class/rust/wargame-rust/target/game] | |
3,278 ???:vec::Vec$LT$T$GT$.ops..Deref$LT$$u{5b}T$u{5d}$GT$::deref::h4573896792301086354 [/home/ryan/class/rust/wargame-rust/target/game] | |
3,250 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.PartialEq::eq::h4fbb4893b72c1cc5lia [/home/ryan/class/rust/wargame-rust/target/game] | |
3,196 /build/buildd/eglibc-2.17/elf/dl-version.c:match_symbol [/lib/x86_64-linux-gnu/ld-2.17.so] | |
3,159 ???:distributions::range::Range$LT$Sup$GT$.IndependentSample$LT$Sup$GT$::ind_sample::h14165641610120655969 [/home/ryan/class/rust/wargame-rust/target/game] | |
3,146 ???:rc::Rc$LT$T$GT$.Drop::drop::h981175649771083214 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,992 ???:je_u2rz.part.7 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,969 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../rawmemchr.S:__GI___rawmemchr [/lib/x86_64-linux-gnu/libc-2.17.so] | |
2,946 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.PartialOrd::lt::h1537ac3c218a2929Lia [/home/ryan/class/rust/wargame-rust/target/game] | |
2,730 ???:iter::range::h12834145911969349969 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,673 ???:rand_impls::u64.Rand::rand::h15702631334761553528 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,662 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::shuffle::h407b19d731daa2fccna [/home/ryan/class/rust/wargame-rust/target/game] | |
2,583 ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::as_ptr::h4071492798656637601 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,521 /build/buildd/eglibc-2.17/string/../string/memcmp.c:bcmp [/lib/x86_64-linux-gnu/ld-2.17.so] | |
2,520 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::length::h481bd669073cea69Bna [/home/ryan/class/rust/wargame-rust/target/game] | |
2,460 ???:ptr::_$RP$mut$u{20}T.RawPtr$LT$T$GT$::is_null::h16934186831575439554 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,420 ???:ptr::_$RP$mut$u{20}T.RawPtr$LT$T$GT$::is_null::h12123092785633290554 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,240 /build/buildd/eglibc-2.17/libio/strops.c:_IO_str_init_static_internal [/lib/x86_64-linux-gnu/libc-2.17.so] | |
2,217 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::new_fresh_deck::h1f84b1ca3f60034aXka [/home/ryan/class/rust/wargame-rust/target/game] | |
2,216 /build/buildd/eglibc-2.17/elf/get-dynamic-info.h:_dl_map_object_from_fd | |
2,196 ???:cell::BorrowRefMut$LT$$u{27}b$GT$.Drop::drop::h8b83093b82493192HTk [/home/ryan/class/rust/wargame-rust/target/game] | |
2,196 ???:cell::BorrowRefMut$LT$$u{27}b$GT$::new::h73821e1e1f6692e3FUk [/home/ryan/class/rust/wargame-rust/target/game] | |
2,112 ???:cmp::PartialOrd::gt::h9941251101035032059 [/home/ryan/class/rust/wargame-rust/target/game] | |
2,091 ???:heap::allocate::h5986f4a64fb02b13haa [/home/ryan/class/rust/wargame-rust/target/game] | |
2,010 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../rtld-strlen.S:strlen [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,984 /build/buildd/eglibc-2.17/libio/iovsscanf.c:vsscanf [/lib/x86_64-linux-gnu/libc-2.17.so] | |
1,940 ???:slice::Iter$LT$$u{27}a$C$$u{20}T$GT$.Iterator$LT$$BP$$u{27}a$u{20}T$GT$::next::h663313571961479376 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,936 ???:cell::Cell$LT$T$GT$::set::h1129187756165397908 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,899 ???:je_arena_boot [/home/ryan/class/rust/wargame-rust/target/game] | |
1,848 ???:je_valgrind_make_mem_undefined [/home/ryan/class/rust/wargame-rust/target/game] | |
1,845 ???:heap::deallocate::h3c0a19ca3c24a548uba [/home/ryan/class/rust/wargame-rust/target/game] | |
1,822 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memset.S:memset [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,769 /build/buildd/eglibc-2.17/nptl/pthread_getattr_np.c:pthread_getattr_np [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
1,722 ???:mem::min_align_of::h5653538932409575312 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,722 ???:collections..vec..Vec$LT$wg..Card$GT$::glue_drop.2105::hcfbc32f19641ab33 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,672 /build/buildd/eglibc-2.17/elf/dl-load.c:open_verify [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,599 ???:ptr::_$RP$mut$u{20}T.RawPtr$LT$T$GT$::null::h10594344216164823667 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,596 ???:je_valgrind_freelike_block [/home/ryan/class/rust/wargame-rust/target/game] | |
1,575 /build/buildd/eglibc-2.17/elf/dl-cache.c:_dl_load_cache_lookup [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,573 ???:ptr::_$RP$mut$u{20}T.RawPtr$LT$T$GT$::null::h9620791130080263290 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,492 /build/buildd/eglibc-2.17/elf/dl-object.c:_dl_new_object [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,399 /build/buildd/eglibc-2.17/libio/genops.c:_IO_setb [/lib/x86_64-linux-gnu/libc-2.17.so] | |
1,368 /build/buildd/eglibc-2.17/libio/genops.c:_IO_old_init [/lib/x86_64-linux-gnu/libc-2.17.so] | |
1,317 ???:je_arena_new [/home/ryan/class/rust/wargame-rust/target/game] | |
1,313 /build/buildd/eglibc-2.17/libio/genops.c:_IO_no_init [/lib/x86_64-linux-gnu/libc-2.17.so] | |
1,293 /build/buildd/eglibc-2.17/elf/dl-fini.c:_dl_sort_fini [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,292 /build/buildd/eglibc-2.17/elf/dl-minimal.c:__libc_memalign [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,230 ???:ptr::null_mut::h2639610851764232249 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,222 ???:vec::Vec$LT$T$GT$::pop::h11200790902904925315 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,218 /build/buildd/eglibc-2.17/elf/../sysdeps/x86_64/dl-trampoline.S:_dl_runtime_resolve [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,210 ???:ptr::null_mut::h2274899381539221158 [/home/ryan/class/rust/wargame-rust/target/game] | |
1,199 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memcpy.S:memcpy [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,190 /build/buildd/eglibc-2.17/elf/dl-reloc.c:_dl_relocate_object [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,158 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::split::hfbdb280504043b8e8la [/home/ryan/class/rust/wargame-rust/target/game] | |
1,154 /build/buildd/eglibc-2.17/elf/rtld.c:dl_main [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,088 /build/buildd/eglibc-2.17/stdio-common/sscanf.c:sscanf [/lib/x86_64-linux-gnu/libc-2.17.so] | |
1,057 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/memcpy.S:mempcpy [/lib/x86_64-linux-gnu/ld-2.17.so] | |
1,056 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.PartialOrd::partial_cmp::h5cd64b2b59dfd4256ia [/home/ryan/class/rust/wargame-rust/target/game] | |
1,050 /build/buildd/eglibc-2.17/nptl/pthread_mutex_init.c:pthread_mutex_init [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
1,040 /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card::new::h669c7cfb6f044abb1fa [/home/ryan/class/rust/wargame-rust/target/game] | |
1,014 /build/buildd/eglibc-2.17/elf/dl-minimal.c:strsep [/lib/x86_64-linux-gnu/ld-2.17.so] | |
954 ???:arena_avail_tree_remove [/home/ryan/class/rust/wargame-rust/target/game] | |
949 /build/buildd/eglibc-2.17/elf/dl-load.c:open_path [/lib/x86_64-linux-gnu/ld-2.17.so] | |
925 ???:arena_avail_tree_insert [/home/ryan/class/rust/wargame-rust/target/game] | |
924 /build/buildd/eglibc-2.17/nptl/cleanup_defer_compat.c:_pthread_cleanup_push_defer [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
910 ???:je_malloc_mutex_init [/home/ryan/class/rust/wargame-rust/target/game] | |
910 ???:num::uint.Int::one::h1e54e6dceac4565bceb [/home/ryan/class/rust/wargame-rust/target/game] | |
905 ???:arena_run_split_remove [/home/ryan/class/rust/wargame-rust/target/game] | |
896 ???:ptr::_$RP$const$u{20}T.RawPtr$LT$T$GT$::offset::h7835999094863459069 [/home/ryan/class/rust/wargame-rust/target/game] | |
861 ???:wg..Deck::glue_drop.2363::h82436de2216833ec [/home/ryan/class/rust/wargame-rust/target/game] | |
847 ???:std..rand..TaskRng::glue_drop.2291::ha0ff45af809de512 [/home/ryan/class/rust/wargame-rust/target/game] | |
847 ???:alloc..rc..Rc$LT$core..cell..RefCell$LT$rand..reseeding..ReseedingRng$LT$std..rand..StdRng$C$$u{20}std..rand..TaskRngReseeder$GT$$GT$$GT$::glue_drop.2294::hfbdb2a3306f41f25 [/home/ryan/class/rust/wargame-rust/target/game] | |
817 /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../strchr.S:index [/lib/x86_64-linux-gnu/ld-2.17.so] | |
792 /build/buildd/eglibc-2.17/malloc/malloc.c:malloc_consolidate [/lib/x86_64-linux-gnu/libc-2.17.so] | |
729 /build/buildd/eglibc-2.17/malloc/malloc.c:_int_malloc [/lib/x86_64-linux-gnu/libc-2.17.so] | |
702 ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::unsafe_get::h8164414677318345474 [/home/ryan/class/rust/wargame-rust/target/game] | |
672 ???:arena_run_split_small [/home/ryan/class/rust/wargame-rust/target/game] | |
629 /build/buildd/eglibc-2.17/elf/dl-error.c:_dl_catch_error [/lib/x86_64-linux-gnu/ld-2.17.so] | |
618 /build/buildd/eglibc-2.17/nptl/pthread_mutex_unlock.c:pthread_mutex_unlock [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
568 /build/buildd/eglibc-2.17/elf/dl-fini.c:_dl_fini [/lib/x86_64-linux-gnu/ld-2.17.so] | |
560 ???:je_choose_arena.part.11 [/home/ryan/class/rust/wargame-rust/target/game] | |
552 /build/buildd/eglibc-2.17/string/../string/memmove.c:memmove [/lib/x86_64-linux-gnu/ld-2.17.so] | |
528 /build/buildd/eglibc-2.17/nptl/cleanup_defer_compat.c:_pthread_cleanup_pop_restore [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
512 ???:arena_bin_nonfull_run_get [/home/ryan/class/rust/wargame-rust/target/game] | |
482 ???:je_bitmap_info_init [/home/ryan/class/rust/wargame-rust/target/game] | |
416 ???:arena_avail_tree_nsearch [/home/ryan/class/rust/wargame-rust/target/game] | |
402 ???:arena_run_dalloc [/home/ryan/class/rust/wargame-rust/target/game] | |
393 /build/buildd/eglibc-2.17/nptl/../nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c:__libc_pthread_init [/lib/x86_64-linux-gnu/libc-2.17.so] | |
392 ???:mem::size_of::h15565388862659609986 [/home/ryan/class/rust/wargame-rust/target/game] | |
384 /build/buildd/eglibc-2.17/stdlib/../stdlib/strtol.c:__strtoul_internal [/lib/x86_64-linux-gnu/libc-2.17.so] | |
378 /build/buildd/eglibc-2.17/elf/dl-init.c:call_init.part.0 [/lib/x86_64-linux-gnu/ld-2.17.so] | |
366 /build/buildd/eglibc-2.17/elf/dl-object.c:_dl_add_to_namespace_list [/lib/x86_64-linux-gnu/ld-2.17.so] | |
360 /build/buildd/eglibc-2.17/elf/dl-load.c:_dl_init_paths [/lib/x86_64-linux-gnu/ld-2.17.so] | |
348 /build/buildd/eglibc-2.17/malloc/malloc.c:_int_free [/lib/x86_64-linux-gnu/libc-2.17.so] | |
342 ???:vec::Vec$LT$T$GT$.Clone::clone::h1677598999622861242 [/home/ryan/class/rust/wargame-rust/target/game] | |
341 /build/buildd/eglibc-2.17/setjmp/../sysdeps/x86_64/setjmp.S:__sigsetjmp [/lib/x86_64-linux-gnu/ld-2.17.so] | |
336 /build/buildd/eglibc-2.17/elf/../elf/dl-sysdep.c:_dl_sysdep_start [/lib/x86_64-linux-gnu/ld-2.17.so] | |
332 /build/buildd/eglibc-2.17/elf/dl-tls.c:_dl_allocate_tls_storage [/lib/x86_64-linux-gnu/ld-2.17.so] | |
322 /build/buildd/eglibc-2.17/stdlib/cxa_finalize.c:__cxa_finalize [/lib/x86_64-linux-gnu/libc-2.17.so] | |
321 /build/buildd/eglibc-2.17/elf/get-dynamic-info.h:dl_main | |
315 /build/buildd/eglibc-2.17/nptl/pthread_mutexattr_settype.c:pthread_mutexattr_settype [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
308 ???:je_tcache_boot [/home/ryan/class/rust/wargame-rust/target/game] | |
288 ???:rand::os::imp::OsRng::new::hdcb4831c4c4790beBdm [/home/ryan/class/rust/wargame-rust/target/game] | |
277 ???:path::posix::normalize_helper::hc6558c4269a8f872Ypk [/home/ryan/class/rust/wargame-rust/target/game] | |
272 /build/buildd/eglibc-2.17/elf/dl-deps.c:openaux [/lib/x86_64-linux-gnu/ld-2.17.so] | |
266 /build/buildd/eglibc-2.17/elf/get-dynamic-info.h:_dl_start | |
264 /build/buildd/eglibc-2.17/elf/dl-hwcaps.c:_dl_important_hwcaps [/lib/x86_64-linux-gnu/ld-2.17.so] | |
264 ???:mem::transmute_copy::h538324405391107770 [/home/ryan/class/rust/wargame-rust/target/game] | |
260 /build/buildd/eglibc-2.17/nptl/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:__libc_sigaction [/lib/x86_64-linux-gnu/libpthread-2.17.so] | |
251 /build/buildd/eglibc-2.17/elf/dl-init.c:_dl_init [/lib/x86_64-linux-gnu/ld-2.17.so] | |
247 /build/buildd/eglibc-2.17/libio/fileops.c:_IO_file_underflow@@GLIBC_2.2.5 [/lib/x86_64-linux-gnu/libc-2.17.so] | |
245 ???:je_bitmap_init [/home/ryan/class/rust/wargame-rust/target/game] | |
236 ???:arena_run_coalesce [/home/ryan/class/rust/wargame-rust/target/game] | |
234 ???:malloc_init_hard [/home/ryan/class/rust/wargame-rust/target/game] | |
225 /build/buildd/eglibc-2.17/elf/dl-lookup.c:_dl_setup_hash [/lib/x86_64-linux-gnu/ld-2.17.so] | |
219 /build/buildd/eglibc-2.17/malloc/arena.c:ptmalloc_init.part.8 [/lib/x86_64-linux-gnu/libc-2.17.so] | |
214 ???:arena_dalloc_bin_run [/home/ryan/class/rust/wargame-rust/target/game] | |
211 /build/buildd/eglibc-2.17/elf/../sysdeps/x86_64/dl-machine.h:_dl_start | |
-------------------------------------------------------------------------------- | |
-- Auto-annotated source: /home/ryan/class/rust/wargame-rust/src/wg.rs | |
-------------------------------------------------------------------------------- | |
Ir | |
. extern crate log; | |
. | |
. use std::fmt; | |
. use std::rand::{task_rng, Rng}; | |
. | |
. | |
. | |
8,304 #[deriving(Clone)] | |
. enum Value { | |
. Two, | |
. Three, | |
. Four, | |
. Five, | |
. Six, | |
. Seven, | |
. Eight, | |
-- line 16 ---------------------------------------- | |
-- line 38 ---------------------------------------- | |
. Value::Queen => "Queen", | |
. Value::King => "King", | |
. Value::Ace => "Ace", | |
. }; | |
. write!(f, "{}", name) | |
. } | |
. } | |
. | |
8,372 #[deriving(Clone)] | |
. enum Suit { | |
. Clubs, | |
. Hearts, | |
. Diamonds, | |
. Spades | |
. } | |
. | |
. impl fmt::Show for Suit { | |
-- line 54 ---------------------------------------- | |
-- line 58 ---------------------------------------- | |
. Suit::Hearts => "Hearts", | |
. Suit::Diamonds => "Diamonds", | |
. Suit::Spades => "Spades", | |
. }; | |
. write!(f, "{}", name) | |
. } | |
. } | |
. | |
4,160 #[deriving(Clone)] | |
. struct Card { | |
780 value: Value, | |
6,920 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Value...std..clone..Clone::clone::h576f0446e360e6dbBaa (260x) | |
780 suit: Suit | |
6,981 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Suit...std..clone..Clone::clone::hc79edb73a18e4d2dtda (260x) | |
. } | |
. | |
. impl Card { | |
468 fn new(value: Value, suit: Suit) -> Card { | |
208 Card {value: value, suit: suit} | |
364 } | |
. | |
3,792 fn get_value(&self) -> uint { | |
7,946 let v:uint = match self.value { | |
53 Value::Two => 2, | |
45 Value::Three => 3, | |
52 Value::Four => 4, | |
53 Value::Five => 5, | |
47 Value::Six => 6, | |
50 Value::Seven => 7, | |
44 Value::Eight => 8, | |
47 Value::Nine => 9, | |
50 Value::Ten => 10, | |
46 Value::Jack => 11, | |
35 Value::Queen => 12, | |
56 Value::King => 13, | |
686 Value::Ace => 14, | |
. }; | |
632 return v; | |
5,056 } | |
. } | |
. | |
. impl fmt::Show for Card { | |
. fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
. write!(f, "{} of {}", self.value, self.suit) | |
. } | |
. } | |
. | |
. /* | |
. Allows direct comparison of cards. | |
. | |
. Annoying amount of code to implement something so straight forward. | |
. */ | |
. impl PartialEq for Card { | |
910 fn eq(&self, other: &Card) -> bool { | |
1,690 (self.get_value() - other.get_value()) == 0 | |
7,700 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card::get_value::h9912705a0aa32caehga (260x) | |
650 } | |
. } | |
. impl PartialOrd for Card { | |
840 fn lt(&self, other: &Card) -> bool { | |
1,386 match self.cmp(other) { Less => true, _ => false} | |
10,178 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.Ord::cmp::h8bcdd834e10ca1d6Aja (120x) | |
720 } | |
462 fn partial_cmp(&self, other: &Card) -> Option<Ordering> { | |
264 Some(self.cmp(other)) | |
5,672 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.Ord::cmp::h8bcdd834e10ca1d6Aja (66x) | |
330 } | |
. } | |
. impl Eq for Card {} | |
. impl Ord for Card { | |
1,302 fn cmp(&self, other: &Card) -> Ordering { | |
558 let v1 = self.get_value(); | |
5,440 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card::get_value::h9912705a0aa32caehga (186x) | |
558 let v2 = other.get_value(); | |
5,550 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card::get_value::h9912705a0aa32caehga (186x) | |
612 if v1 < v2 {return Less;} | |
660 if v1 > v2 {return Greater;} | |
744 return Equal; | |
426 } | |
. } | |
. | |
. #[deriving(Clone)] | |
. struct Deck(Vec<Card>); | |
. | |
. impl Deck { | |
. | |
. /* | |
. Makes a fresh deck of 52 regular cards. | |
. */ | |
10 fn new_fresh_deck() -> Deck { | |
. | |
4 let mut cards:Vec<Card> = Vec::with_capacity(52); | |
1,254 => ???:vec::Vec$LT$T$GT$::with_capacity::h1674525608498800858 (1x) | |
83 for suit in [Suit::Spades, Suit::Hearts, Suit::Diamonds, Suit::Clubs].iter() { | |
252 => ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::iter::h364345618110268074 (1x) | |
253 => ???:slice::Iter$LT$$u{27}a$C$$u{20}T$GT$.Iterator$LT$$BP$$u{27}a$u{20}T$GT$::next::h11970161683459224676 (5x) | |
520 for value in [ | |
3,136 => ???:slice::Iter$LT$$u{27}a$C$$u{20}T$GT$.Iterator$LT$$BP$$u{27}a$u{20}T$GT$::next::h663313571961479376 (56x) | |
1,008 => ???:slice::_$u{5b}T$u{5d}.SliceExt$LT$T$GT$::iter::h13820263738942297320 (4x) | |
12 Value::Two, Value::Three, Value::Four, | |
12 Value::Five, Value::Six, Value::Seven, | |
12 Value::Eight, Value::Nine, Value::Ten, | |
12 Value::Jack, Value::Queen, Value::King, | |
24 Value::Ace | |
. ].iter() { | |
1,508 cards.push(Card::new(value.clone(), suit.clone())); | |
1,384 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Value...std..clone..Clone::clone::h576f0446e360e6dbBaa (52x) | |
1,391 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Suit...std..clone..Clone::clone::hc79edb73a18e4d2dtda (52x) | |
4,368 => ???:vec::Vec$LT$T$GT$::push::h13811101999849887939 (52x) | |
1,040 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card::new::h669c7cfb6f044abb1fa (52x) | |
. } | |
. } | |
10 Deck(cards) | |
19 => /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memset.S:__memset_x86_64 (1x) | |
10 } | |
19 => ???:collections..vec..Vec$LT$wg..Card$GT$::glue_drop.2105::hcfbc32f19641ab33 (1x) | |
. | |
1,089 fn new() -> Deck { | |
847 let mut cards:Vec<Card> = Vec::with_capacity(52); | |
69,578 => ???:vec::Vec$LT$T$GT$::with_capacity::h1674525608498800858 (121x) | |
1,331 Deck(cards) | |
2,299 => /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memset.S:__memset_x86_64 (121x) | |
726 } | |
2,299 => ???:collections..vec..Vec$LT$wg..Card$GT$::glue_drop.2105::hcfbc32f19641ab33 (121x) | |
. | |
7 fn split(&mut self) -> Deck { | |
2 let &Deck(ref mut cards) = self; | |
8 let length = cards.len(); | |
11 => ???:vec::Vec$LT$T$GT$::len::h4231617977691762399 (1x) | |
10 let half = length / 2u; | |
. | |
. // a vector(52) for awaiting cards | |
1 let mut _cards:Vec<Card> = Vec::with_capacity(52); | |
578 => ???:vec::Vec$LT$T$GT$::with_capacity::h1674525608498800858 (1x) | |
200 for _ in range(0, half) { | |
2,201 => ???:iter::Range$LT$A$GT$.Iterator$LT$A$GT$::next::h4141019300653566686 (27x) | |
28 => ???:iter::range::h12834145911969349969 (1x) | |
728 let c:Card = match cards.pop() { | |
5,538 => ???:vec::Vec$LT$T$GT$::pop::h11200790902904925315 (26x) | |
. None => continue, | |
52 Some(v) => v | |
. }; | |
130 _cards.push(c); | |
2,184 => ???:vec::Vec$LT$T$GT$::push::h13811101999849887939 (26x) | |
. } | |
. | |
. // returns a new deck | |
10 Deck(_cards) | |
19 => /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memset.S:__memset_x86_64 (1x) | |
10 } | |
19 => ???:collections..vec..Vec$LT$wg..Card$GT$::glue_drop.2105::hcfbc32f19641ab33 (1x) | |
. | |
847 fn shuffle(&mut self) { | |
. let &Deck(ref mut cards) = self; | |
. | |
242 let mut rng = task_rng(); | |
29,487 => ???:rand::task_rng::h4fa5c903697b0f92lnm (121x) | |
968 rng.shuffle(cards.as_mut_slice()); | |
105,532 => ???:Rng::shuffle::h11180652618550122827 (121x) | |
2,420 => ???:vec::Vec$LT$T$GT$::as_mut_slice::h1039610149892998033 (121x) | |
. | |
605 } | |
29,161 => ???:std..rand..TaskRng::glue_drop.2291::ha0ff45af809de512 (121x) | |
. | |
840 fn length(&mut self) -> uint { | |
280 let &Deck(ref mut cards) = self; | |
. | |
280 return cards.len() | |
1,540 => ???:vec::Vec$LT$T$GT$::len::h4231617977691762399 (140x) | |
1,120 } | |
. | |
1,452 fn has_cards(&mut self) -> bool { | |
484 let &Deck(ref mut cards) = self; | |
1,452 cards.len() > 0u | |
2,662 => ???:vec::Vec$LT$T$GT$::len::h4231617977691762399 (242x) | |
1,210 } | |
. | |
. /* | |
. Get the card at the top of the deck. | |
. */ | |
2,340 fn get_card(&mut self) -> Card { | |
. let &Deck(ref mut cards) = self; | |
1,040 cards[0].clone() | |
13,000 => ???:vec::Vec$LT$T$GT$.Index$LT$uint$C$$u{20}T$GT$::index::h7326617153303211307 (260x) | |
19,621 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card...std..clone..Clone::clone::h0cf76ceceb78230cvfa (260x) | |
780 } | |
. | |
. /* | |
. Remove the card from the top of the deck. | |
. */ | |
4,382 fn give_card(&mut self, deck: &mut Deck) -> () { | |
1,252 let &Deck(ref mut cards) = self; | |
1,252 let &Deck(ref mut cards2) = deck; | |
. | |
14,398 let card:Card = match cards.remove(0) { | |
228,100 => ???:vec::Vec$LT$T$GT$::remove::h5640987603050366185 (626x) | |
. None => return (), | |
1,252 Some(c) => c | |
. }; | |
3,756 cards2.push(card) | |
52,584 => ???:vec::Vec$LT$T$GT$::push::h13811101999849887939 (626x) | |
3,130 } | |
. | |
. } | |
. | |
. impl fmt::Show for Deck { | |
. fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
. let &Deck(ref cards) = self; | |
. | |
. // a better method might be map to connect these strings | |
-- line 228 ---------------------------------------- | |
-- line 235 ---------------------------------------- | |
. text.push_str(", "); | |
. } | |
. } | |
. write!(f, "{}", text) | |
. } | |
. } | |
. | |
. | |
7 pub fn game() { | |
. | |
3 let mut player1 = Deck::new_fresh_deck(); | |
16,341 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::new_fresh_deck::h1f84b1ca3f60034aXka (1x) | |
. | |
3 player1.shuffle(); | |
45,686 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::shuffle::h407b19d731daa2fccna (1x) | |
. | |
4 let mut player2 = player1.split(); | |
11,736 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::split::hfbdb280504043b8e8la (1x) | |
. | |
1 let mut turns = 0u; | |
. | |
2,906 'base: while player1.has_cards() && player2.has_cards() { | |
7,260 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::has_cards::h443713a1d94e92baTna (242x) | |
363 turns = turns + 1; | |
. | |
. // log(format!("Turn #{}", turns)); | |
. | |
. // log(format!("P1 {}; P2 {}", player1.length(), player2.length())); | |
. | |
363 let mut winner:Deck = Deck::new(); | |
78,169 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::new::hb3494e84bfef0d9eQla (121x) | |
. | |
1,089 let mut card1:Card = player1.get_card(); | |
17,101 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::get_card::h9068ef598095c63dcoa (121x) | |
1,089 let mut card2:Card = player2.get_card(); | |
17,144 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::get_card::h9068ef598095c63dcoa (121x) | |
. | |
484 player1.give_card(&mut winner); | |
68,365 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (121x) | |
484 player2.give_card(&mut winner); | |
64,116 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (121x) | |
. | |
. // log(format!("P1: {}; P2: {}", card1, card2)); | |
. | |
1,210 if card1 == card2 { | |
10,200 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.PartialEq::eq::h4fbb4893b72c1cc5lia (121x) | |
. | |
10 let mut wars = 0u; | |
. | |
19 'war: while { | |
. | |
. // log(format!("P1: {} = P2: {}", card1, card2)); | |
. | |
259 if player1.length() < 4 || player2.length() < 4 { | |
580 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::length::h481bd669073cea69Bna (20x) | |
. // log(format!("Not enough cards for war!")); | |
. break 'base; | |
. } | |
27 wars = wars + 1; | |
. // log(format!("War #{}", wars)); | |
. | |
. // each player provides 3 cards to the winner | |
360 for _ in range(0, 3u) { | |
2,628 => ???:iter::Range$LT$A$GT$.Iterator$LT$A$GT$::next::h4141019300653566686 (36x) | |
252 => ???:iter::range::h12834145911969349969 (9x) | |
108 player1.give_card(&mut winner); | |
14,550 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (27x) | |
108 player2.give_card(&mut winner); | |
14,574 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (27x) | |
. } | |
. | |
. // get the top cards | |
117 card1 = player1.get_card(); | |
1,264 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::get_card::h9068ef598095c63dcoa (9x) | |
117 card2 = player2.get_card(); | |
1,272 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::get_card::h9068ef598095c63dcoa (9x) | |
. | |
. // send the top cards to the winner deck | |
36 player1.give_card(&mut winner); | |
4,843 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (9x) | |
36 player2.give_card(&mut winner); | |
4,773 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (9x) | |
. | |
90 if card1 < card2 { | |
981 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.PartialOrd::lt::h1537ac3c218a2929Lia (9x) | |
. // log(format!("P1: {} < P2: {}; W {}", card1, card2, winner.length())); | |
9 winner.shuffle(); | |
11,592 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::shuffle::h407b19d731daa2fccna (3x) | |
285 for _ in range(0, winner.length()) { | |
2,619 => ???:iter::Range$LT$A$GT$.Iterator$LT$A$GT$::next::h4141019300653566686 (33x) | |
84 => ???:iter::range::h12834145911969349969 (3x) | |
87 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::length::h481bd669073cea69Bna (3x) | |
120 winner.give_card(&mut player2); | |
14,142 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (30x) | |
. } | |
48 } else if card1 > card2 { | |
795 => ???:cmp::PartialOrd::gt::h9941251101035032059 (6x) | |
. // log(format!("P1: {} > P2: {}; W {}", card1, card2, winner.length())); | |
18 winner.shuffle(); | |
23,184 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::shuffle::h407b19d731daa2fccna (6x) | |
564 for _ in range(0, winner.length()) { | |
5,238 => ???:iter::Range$LT$A$GT$.Iterator$LT$A$GT$::next::h4141019300653566686 (66x) | |
168 => ???:iter::range::h12834145911969349969 (6x) | |
174 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::length::h481bd669073cea69Bna (6x) | |
240 winner.give_card(&mut player1); | |
28,284 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (60x) | |
. } | |
24 } else { | |
. // perform another war | |
. // the cards are equal | |
. } | |
. | |
. // this must be the last line to emulate the do-while structure | |
. // please, tell me how to convert this into a non-hack | |
. // and it shall be done. | |
99 card1 == card2 | |
750 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.PartialEq::eq::h4fbb4893b72c1cc5lia (9x) | |
. } {} | |
. | |
. // log(format!("War has ended")); | |
. | |
1,113 } else if card1 < card2 { | |
12,143 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Card.PartialOrd::lt::h1537ac3c218a2929Lia (111x) | |
. // log(format!("P1: {} < P2: {}; W {}", card1, card2, winner.length())); | |
153 winner.shuffle(); | |
40,800 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::shuffle::h407b19d731daa2fccna (51x) | |
1,989 for _ in range(0, winner.length()) { | |
10,659 => ???:iter::Range$LT$A$GT$.Iterator$LT$A$GT$::next::h4141019300653566686 (153x) | |
1,428 => ???:iter::range::h12834145911969349969 (51x) | |
1,479 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::length::h481bd669073cea69Bna (51x) | |
408 winner.give_card(&mut player2); | |
44,319 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (102x) | |
. } | |
600 } else if card1 > card2 { | |
8,045 => ???:cmp::PartialOrd::gt::h9941251101035032059 (60x) | |
. // log(format!("P1: {} > P2: {}; W {}", card1, card2, winner.length())); | |
180 winner.shuffle(); | |
48,000 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::shuffle::h407b19d731daa2fccna (60x) | |
2,631 for _ in range(0, winner.length()) { | |
12,540 => ???:iter::Range$LT$A$GT$.Iterator$LT$A$GT$::next::h4141019300653566686 (180x) | |
1,680 => ???:iter::range::h12834145911969349969 (60x) | |
1,740 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::length::h481bd669073cea69Bna (60x) | |
480 winner.give_card(&mut player1); | |
52,140 => /home/ryan/class/rust/wargame-rust/src/wg.rs:wg::Deck::give_card::hb5d41add17741eabvoa (120x) | |
. } | |
. } | |
. | |
. | |
242 } | |
93,959 => ???:wg..Deck::glue_drop.2363::h82436de2216833ec (121x) | |
. | |
. | |
. // log(format!("Total turns: {}", turns)); | |
. // log(format!("P1: {}; P2: {}", player1.length(), player2.length())); | |
. | |
6 } | |
9,435 => ???:wg..Deck::glue_drop.2363::h82436de2216833ec (2x) | |
. | |
. pub fn backprint(s: String) { | |
. print!("\r{}", s); | |
. } | |
-------------------------------------------------------------------------------- | |
The following files chosen for auto-annotation could not be found: | |
-------------------------------------------------------------------------------- | |
/build/buildd/eglibc-2.17/nptl/cleanup_defer_compat.c | |
/build/buildd/eglibc-2.17/elf/dl-load.c | |
/build/buildd/eglibc-2.17/elf/dl-lookup.c | |
/build/buildd/eglibc-2.17/elf/dl-cache.c | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../rtld-strlen.S | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/memcpy.S | |
/build/buildd/eglibc-2.17/setjmp/../sysdeps/x86_64/setjmp.S | |
/build/buildd/eglibc-2.17/string/../string/memmove.c | |
/build/buildd/eglibc-2.17/elf/../sysdeps/x86_64/dl-trampoline.S | |
/build/buildd/eglibc-2.17/libio/strops.c | |
/build/buildd/eglibc-2.17/elf/dl-error.c | |
/build/buildd/eglibc-2.17/nptl/pthread_mutex_lock.c | |
/build/buildd/eglibc-2.17/elf/dl-fini.c | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/memchr.S | |
/build/buildd/eglibc-2.17/nptl/../nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c | |
/build/buildd/eglibc-2.17/stdio-common/sscanf.c | |
/build/buildd/eglibc-2.17/libio/genops.c | |
/build/buildd/eglibc-2.17/elf/dl-hwcaps.c | |
/build/buildd/eglibc-2.17/nptl/../sysdeps/unix/sysv/linux/x86_64/sigaction.c | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memset.S | |
/build/buildd/eglibc-2.17/string/wordcopy.c | |
/build/buildd/eglibc-2.17/string/../string/memcmp.c | |
/build/buildd/eglibc-2.17/elf/../sysdeps/x86_64/dl-machine.h | |
/build/buildd/eglibc-2.17/nptl/pthread_mutex_init.c | |
/build/buildd/eglibc-2.17/nptl/pthread_mutex_unlock.c | |
/build/buildd/eglibc-2.17/elf/dl-deps.c | |
/build/buildd/eglibc-2.17/stdlib/../stdlib/strtol.c | |
/build/buildd/eglibc-2.17/elf/dl-addr.c | |
/build/buildd/eglibc-2.17/nptl/pthread_getattr_np.c | |
/build/buildd/eglibc-2.17/malloc/arena.c | |
/build/buildd/eglibc-2.17/elf/dl-minimal.c | |
/build/buildd/eglibc-2.17/stdio-common/vfscanf.c | |
/build/buildd/eglibc-2.17/elf/dl-reloc.c | |
/build/buildd/eglibc-2.17/libio/iovsscanf.c | |
/build/buildd/eglibc-2.17/stdlib/cxa_finalize.c | |
/build/buildd/eglibc-2.17/elf/do-rel.h | |
/build/buildd/eglibc-2.17/elf/dl-misc.c | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../memcpy.S | |
/build/buildd/eglibc-2.17/nptl/pthread_mutexattr_settype.c | |
/build/buildd/eglibc-2.17/elf/../elf/dl-runtime.c | |
/build/buildd/eglibc-2.17/elf/../elf/dl-sysdep.c | |
/build/buildd/eglibc-2.17/elf/dl-object.c | |
/build/buildd/eglibc-2.17/elf/dl-init.c | |
/build/buildd/eglibc-2.17/elf/rtld.c | |
/build/buildd/eglibc-2.17/stdlib/../stdlib/strtol_l.c | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../strchr.S | |
/build/buildd/eglibc-2.17/malloc/malloc.c | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../rawmemchr.S | |
/build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/../strcmp.S | |
/build/buildd/eglibc-2.17/elf/dl-version.c | |
/build/buildd/eglibc-2.17/libio/iogetdelim.c | |
/build/buildd/eglibc-2.17/libio/fileops.c | |
/build/buildd/eglibc-2.17/elf/get-dynamic-info.h | |
/build/buildd/eglibc-2.17/elf/dl-tls.c | |
-------------------------------------------------------------------------------- | |
Ir | |
-------------------------------------------------------------------------------- | |
9 percentage of events annotated | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment