linux-lts-quantal-3.5.0/kernel/replay.c
// PARSPEC: eventually: want to make sure that all replay groups are destroyed
want to make sure that all replay groups are destroyed
want to make sure that all replay groups are destroyed
static void
destroy_record_group (struct record_group *prg)
{
	struct reserved_mapping* pmapping;
	MPRINT ("Pid %d destroying record group %p\n", current->pid, prg);
#ifdef REPLAY_PAUSE
	if (replay_pause_tool) {
		atomic_set ((prg->rg_pkrecord_clock + 1), 0);
		printk ("Pid %d clear up pause clock\n", current->pid);
	}
#endif
	kunmap (prg->rg_shared_page);
	put_page (prg->rg_shared_page);
	if (prg->rg_libpath) KFREE (prg->rg_libpath);
	while ((pmapping = ds_list_get_first (prg->rg_reserved_mem_list)) != NULL) {
		KFREE (pmapping);
	}
	recycle_shared_clock (prg->rg_shmpath);
	ds_list_destroy (prg->rg_reserved_mem_list);
	KFREE (prg);
#ifdef REPLAY_PARANOID
	printk ("vmalloc cnt: %d\n", atomic_read(&vmalloc_cnt));
#endif
}
static void destroy_record_group ( struct record_group * prg ) { struct reserved_mapping * pmapping ; MPRINT ( " \n " , current -> pid , prg ) ; #ifdef REPLAY_PAUSE if ( replay_pause_tool ) { atomic_set ( ( prg -> rg_pkrecord_clock + 1 ) , 0 ) ; printk ( " \n " , current -> pid ) ; } #endif kunmap ( prg -> rg_shared_page ) ; put_page ( prg -> rg_shared_page ) ; if ( prg -> rg_libpath ) KFREE ( prg -> rg_libpath ) ; while ( ( pmapping = ds_list_get_first ( prg -> rg_reserved_mem_list ) ) != NULL ) { KFREE ( pmapping ) ; } recycle_shared_clock ( prg -> rg_shmpath ) ; ds_list_destroy ( prg -> rg_reserved_mem_list ) ; KFREE ( prg ) ; #ifdef REPLAY_PARANOID printk ( " \n " , atomic_read ( & vmalloc_cnt ) ) ; #endif }
PARSPEC: eventually: want to make sure that all replay groups are destroyed
PARSPEC : eventually : want to make sure that all replay groups are destroyed
// Free all of the mappings