亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gmon.c

?? 早期freebsd實現
?? C
字號:
/*- * Copyright (c) 1983, 1992, 1993 *	The Regents of the University of California.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */#if !defined(lint) && defined(LIBC_SCCS)static char sccsid[] = "@(#)gmon.c	8.1 (Berkeley) 6/4/93";#endif#include <sys/param.h>#include <sys/time.h>#include <sys/gmon.h>#include <sys/sysctl.h>#include <stdio.h>#include <fcntl.h>#include <unistd.h>extern char *minbrk asm ("minbrk");struct gmonparam _gmonparam = { GMON_PROF_OFF };static int	s_scale;/* see profil(2) where this is describe (incorrectly) */#define		SCALE_1_TO_1	0x10000L#define ERR(s) write(2, s, sizeof(s))void	moncontrol __P((int));static int hertz __P((void));voidmonstartup(lowpc, highpc)	u_long lowpc;	u_long highpc;{	register int o;	char *cp;	struct gmonparam *p = &_gmonparam;	/*	 * round lowpc and highpc to multiples of the density we're using	 * so the rest of the scaling (here and in gprof) stays in ints.	 */	p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));	p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));	p->textsize = p->highpc - p->lowpc;	p->kcountsize = p->textsize / HISTFRACTION;	p->hashfraction = HASHFRACTION;	p->fromssize = p->textsize / HASHFRACTION;	p->tolimit = p->textsize * ARCDENSITY / 100;	if (p->tolimit < MINARCS)		p->tolimit = MINARCS;	else if (p->tolimit > MAXARCS)		p->tolimit = MAXARCS;	p->tossize = p->tolimit * sizeof(struct tostruct);	cp = sbrk(p->kcountsize + p->fromssize + p->tossize);	if (cp == (char *)-1) {		ERR("monstartup: out of memory\n");		return;	}#ifdef notdef	bzero(cp, p->kcountsize + p->fromssize + p->tossize);#endif	p->tos = (struct tostruct *)cp;	cp += p->tossize;	p->kcount = (u_short *)cp;	cp += p->kcountsize;	p->froms = (u_short *)cp;	minbrk = sbrk(0);	p->tos[0].link = 0;	o = p->highpc - p->lowpc;	if (p->kcountsize < o) {#ifndef hp300		s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;#else /* avoid floating point */		int quot = o / p->kcountsize;				if (quot >= 0x10000)			s_scale = 1;		else if (quot >= 0x100)			s_scale = 0x10000 / quot;		else if (o >= 0x800000)			s_scale = 0x1000000 / (o / (p->kcountsize >> 8));		else			s_scale = 0x1000000 / ((o << 8) / p->kcountsize);#endif	} else		s_scale = SCALE_1_TO_1;	moncontrol(1);}void_mcleanup(){	int fd;	int fromindex;	int endfrom;	u_long frompc;	int toindex;	struct rawarc rawarc;	struct gmonparam *p = &_gmonparam;	struct gmonhdr gmonhdr, *hdr;	struct clockinfo clockinfo;	int mib[2];	size_t size;#ifdef DEBUG	int log, len;	char buf[200];#endif	if (p->state == GMON_PROF_ERROR)		ERR("_mcleanup: tos overflow\n");	size = sizeof(clockinfo);	mib[0] = CTL_KERN;	mib[1] = KERN_CLOCKRATE;	if (sysctl(mib, 2, &clockinfo, &size, NULL, 0) < 0) {		/*		 * Best guess		 */		clockinfo.profhz = hertz();	} else if (clockinfo.profhz == 0) {		if (clockinfo.hz != 0)			clockinfo.profhz = clockinfo.hz;		else			clockinfo.profhz = hertz();	}	moncontrol(0);	fd = open("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);	if (fd < 0) {		perror("mcount: gmon.out");		return;	}#ifdef DEBUG	log = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664);	if (log < 0) {		perror("mcount: gmon.log");		return;	}	len = sprintf(buf, "[mcleanup1] kcount 0x%x ssiz %d\n",	    p->kcount, p->kcountsize);	write(log, buf, len);#endif	hdr = (struct gmonhdr *)&gmonhdr;	hdr->lpc = p->lowpc;	hdr->hpc = p->highpc;	hdr->ncnt = p->kcountsize + sizeof(gmonhdr);	hdr->version = GMONVERSION;	hdr->profrate = clockinfo.profhz;	write(fd, (char *)hdr, sizeof *hdr);	write(fd, p->kcount, p->kcountsize);	endfrom = p->fromssize / sizeof(*p->froms);	for (fromindex = 0; fromindex < endfrom; fromindex++) {		if (p->froms[fromindex] == 0)			continue;		frompc = p->lowpc;		frompc += fromindex * p->hashfraction * sizeof(*p->froms);		for (toindex = p->froms[fromindex]; toindex != 0;		     toindex = p->tos[toindex].link) {#ifdef DEBUG			len = sprintf(buf,			"[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,				frompc, p->tos[toindex].selfpc,				p->tos[toindex].count);			write(log, buf, len);#endif			rawarc.raw_frompc = frompc;			rawarc.raw_selfpc = p->tos[toindex].selfpc;			rawarc.raw_count = p->tos[toindex].count;			write(fd, &rawarc, sizeof rawarc);		}	}	close(fd);}/* * Control profiling *	profiling is what mcount checks to see if *	all the data structures are ready. */voidmoncontrol(mode)	int mode;{	struct gmonparam *p = &_gmonparam;	if (mode) {		/* start */		profil((char *)p->kcount, p->kcountsize, (int)p->lowpc,		    s_scale);		p->state = GMON_PROF_ON;	} else {		/* stop */		profil((char *)0, 0, 0, 0);		p->state = GMON_PROF_OFF;	}}/* * discover the tick frequency of the machine * if something goes wrong, we return 0, an impossible hertz. */static inthertz(){	struct itimerval tim;		tim.it_interval.tv_sec = 0;	tim.it_interval.tv_usec = 1;	tim.it_value.tv_sec = 0;	tim.it_value.tv_usec = 0;	setitimer(ITIMER_REAL, &tim, 0);	setitimer(ITIMER_REAL, 0, &tim);	if (tim.it_interval.tv_usec < 2)		return(0);	return (1000000 / tim.it_interval.tv_usec);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区国产| 日本久久电影网| 日韩精品电影一区亚洲| 亚洲一区二区三区三| 一区二区三区中文在线观看| 亚洲黄色小视频| 亚洲成a人片在线不卡一二三区| 亚洲一区二区不卡免费| 日韩精品电影一区亚洲| 乱中年女人伦av一区二区| 免费成人在线影院| 国精产品一区一区三区mba视频| 精品亚洲国内自在自线福利| 久久66热re国产| 国产成人精品免费网站| 91丝袜国产在线播放| 欧美美女网站色| 欧美精品一区二区三区视频 | 91美女视频网站| 日本久久一区二区| 欧美一区二区美女| 国产欧美1区2区3区| 一区二区日韩电影| 蜜臀久久久99精品久久久久久| 国产自产视频一区二区三区| 成人动漫一区二区| 91麻豆精品国产91久久久资源速度| 久久午夜国产精品| 亚洲在线中文字幕| 国产成人精品影视| 欧美三级三级三级爽爽爽| 日韩欧美二区三区| 一区二区三区在线观看国产| 美国三级日本三级久久99| 色哟哟一区二区三区| 精品99999| 亚洲18色成人| 91亚洲精品乱码久久久久久蜜桃 | 99精品久久99久久久久| 欧美久久久久免费| 国产精品久久二区二区| 老司机免费视频一区二区| 一本色道久久综合狠狠躁的推荐| 777午夜精品视频在线播放| 亚洲视频一二区| 国产高清精品在线| 8v天堂国产在线一区二区| 中文字幕在线免费不卡| 国产麻豆午夜三级精品| 3atv一区二区三区| 亚洲黄色录像片| 99这里都是精品| 欧美国产精品中文字幕| 久久精品国内一区二区三区| 欧美视频三区在线播放| 一区二区三区中文免费| av成人免费在线观看| 国产午夜精品一区二区三区嫩草| 国产精品18久久久久久vr| 欧美精品99久久久**| 亚洲久草在线视频| 91麻豆免费观看| 中文字幕一区二区三| 国产精品一区二区三区99| 日韩三级.com| 精品亚洲成av人在线观看| 欧美电视剧在线看免费| 久久国产麻豆精品| 欧美不卡一区二区| 精品一区二区三区影院在线午夜| 日韩欧美国产三级电影视频| 亚洲成av人影院在线观看网| 欧美性色黄大片| 亚洲国产视频在线| 欧美一级一级性生活免费录像| 亚洲电影在线播放| 欧美精品1区2区3区| 蜜臀av性久久久久av蜜臀妖精| 欧美一区二区三区日韩视频| 免费黄网站欧美| 精品国产三级电影在线观看| 国产成人av资源| 亚洲欧美中日韩| 一本一道综合狠狠老| 亚洲午夜三级在线| 91精品国产高清一区二区三区 | 美国三级日本三级久久99| 在线成人av影院| 麻豆91小视频| 国产欧美一区二区精品秋霞影院 | 久久久久国产一区二区三区四区| 狠狠色综合日日| 日本一区二区三级电影在线观看 | 在线观看91视频| 亚洲www啪成人一区二区麻豆| 欧美日韩一级片在线观看| 日韩高清不卡一区二区| 日韩视频免费观看高清完整版| 久久99精品网久久| 亚洲视频一区二区免费在线观看| 色呦呦网站一区| 日韩精品电影一区亚洲| 欧美国产综合色视频| av一区二区三区在线| 日韩国产高清在线| 久久精品视频一区二区| 色婷婷狠狠综合| 日本欧美肥老太交大片| 久久老女人爱爱| 一本色道久久综合狠狠躁的推荐| 麻豆国产欧美日韩综合精品二区| 国产精品女同互慰在线看| 在线日韩一区二区| 国产精品一色哟哟哟| 三级影片在线观看欧美日韩一区二区 | 精品久久人人做人人爰| 不卡视频在线看| 久久狠狠亚洲综合| 亚洲一区二区三区免费视频| 久久久精品黄色| 国产精品女人毛片| 日韩亚洲欧美成人一区| 欧美在线影院一区二区| 成人午夜短视频| 韩国女主播一区二区三区| 一级做a爱片久久| 国产女主播视频一区二区| 日韩一区二区三区视频| 欧美四级电影网| 色悠悠久久综合| a美女胸又www黄视频久久| 韩国理伦片一区二区三区在线播放| 亚洲一区二区影院| 中文字幕亚洲不卡| 欧美激情一区二区三区四区| 精品乱码亚洲一区二区不卡| 91精品国产综合久久福利软件| 日本丰满少妇一区二区三区| 成人午夜免费电影| 成人av午夜影院| 丁香啪啪综合成人亚洲小说| 国产成人综合在线播放| 国内精品伊人久久久久av一坑| 免费成人av在线| 丝袜亚洲精品中文字幕一区| 偷拍自拍另类欧美| 日韩精品电影一区亚洲| 欧美96一区二区免费视频| 丝袜美腿亚洲一区二区图片| 婷婷亚洲久悠悠色悠在线播放 | 麻豆高清免费国产一区| 秋霞电影网一区二区| 无吗不卡中文字幕| 视频一区欧美精品| 麻豆一区二区在线| 久久成人久久爱| 国产做a爰片久久毛片| 国产在线不卡一区| 成人午夜短视频| 91成人在线观看喷潮| 欧美喷水一区二区| 日韩精品一区二区三区四区 | jizz一区二区| 在线影视一区二区三区| 欧美三电影在线| 欧美一级片在线观看| 国产视频一区在线观看| 中文字幕欧美区| 亚洲一区中文日韩| 蜜桃视频在线观看一区二区| 国产精品系列在线观看| 97se亚洲国产综合自在线观| 欧美亚洲愉拍一区二区| 日韩精品一区二| 国产精品的网站| 天堂成人免费av电影一区| 久久国产尿小便嘘嘘尿| 99re热这里只有精品免费视频 | 国模冰冰炮一区二区| a在线欧美一区| 6080日韩午夜伦伦午夜伦| 久久久www免费人成精品| 亚洲精品成人悠悠色影视| 青青草国产精品亚洲专区无| 国产成人av电影| 欧美日韩另类国产亚洲欧美一级| 久久久久久麻豆| 午夜影视日本亚洲欧洲精品| 国产制服丝袜一区| 欧美性一二三区| 欧美激情一区二区三区四区| 日韩经典一区二区| 99免费精品视频| 日韩女优毛片在线| 亚洲午夜一二三区视频| 国产精品亚洲专一区二区三区| 欧美日本一道本在线视频| 中文在线一区二区| 免费成人性网站| 精品视频1区2区3区|