黑客24小时在线接单网站

黑客在线接单,网站入侵,渗透测试,渗透网站,入侵网站

包含xss136的词条

本文目录一览:

求助:DS18B20单片机控温,导入学习板后没反应

我写的DS18B20程序,可参考

#include reg52.h

#include intrins.h

#include stdio.h

#define uchar unsigned char

#define uint unsigned int

*** it xssj=P1^0; //显示数据

*** it xssz=P1^1; //显示时钟

*** it control=P1^3;

*** it DQ = P1^4;

bit flag;

uint Temperature;

uint temp[9];

uchar temp_buff[9]; //存储读取的字节,read scratchpad为9字节,read rom ID为8字节

uchar id_buff[8];

uchar *p;

uchar crc_data;

uint Temperature_h;

uint Temperature_l;

uchar code Crcontrolable [256]={

0, 94, 188, 226, 97, 63, 221, 131, 194, 156, 126, 32, 163, 253, 31, 65,

157, 195, 33, 127, 252, 162, 64, 30, 95, 1, 227, 189, 62, 96, 130, 220,

35, 125, 159, 193, 66, 28, 254, 160, 225, 191, 93, 3, 128, 222, 60, 98,

190, 224, 2, 92, 223, 129, 99, 61, 124, 34, 192, 158, 29, 67, 161, 255,

70, 24, 250, 164, 39, 121, 155, 197, 132, 218, 56, 102, 229, 187, 89, 7,

219, 133, 103, 57, 186, 228, 6, 88, 25, 71, 165, 251, 120, 38, 196, 154,

101, 59, 217, 135, 4, 90, 184, 230, 167, 249, 27, 69, 198, 152, 122, 36,

248, 166, 68, 26, 153, 199, 37, 123, 58, 100, 134, 216, 91, 5, 231, 185,

140, 210, 48, 110, 237, 179, 81, 15, 78, 16, 242, 172, 47, 113, 147, 205,

17, 79, 173, 243, 112, 46, 204, 146, 211, 141, 111, 49, 178, 236, 14, 80,

175, 241, 19, 77, 206, 144, 114, 44, 109, 51, 209, 143, 12, 82, 176, 238,

50, 108, 142, 208, 83, 13, 239, 177, 240, 174, 76, 18, 145, 207, 45, 115,

202, 148, 118, 40, 171, 245, 23, 73, 8, 86, 180, 234, 105, 55, 213, 139,

87, 9, 235, 181, 54, 104, 138, 212, 149, 203, 41, 119, 244, 170, 72, 22,

233, 183, 85, 11, 136, 214, 52, 106, 43, 117, 151, 201, 74, 20, 246, 168,

116, 42, 200, 150, 21, 75, 169, 247, 182, 232, 10, 84, 215, 137, 107, 53};

//uchar code tab[16]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};//共阳极0-F代码

uchar code tab[18]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0,0x40};//共阴极0-F代码

void delay1ms(int t)

{

int i,j,k=0;

for(k=0;kt;k++)

{for(j=0;j=25;j++)

{for(i=0;i255;i++){;}}}

}

/************************************************************

*Funcontrolion:延时处理

*parameter:

*Return:

*Modify:

*************************************************************/

void TempDelay (uchar us)

{

while(us--);

}

/************************************************************

*Funcontrolion:18B20初始化

*parameter:

*Return:

*Modify:

*************************************************************/

void Init18b20 (void)

{

DQ=1;

_nop_();

DQ=0;

TempDelay(86); //delay 530 uS//80

_nop_();

DQ=1;

TempDelay(14); //delay 100 uS//14

_nop_();

_nop_();

_nop_();

if(DQ==0)

{

flag = 1; //detecontrol 1820 success!

TempDelay(20); //delay 530 uS//80

}

else

{

flag = 0; //detecontrol 1820 fail!

}

TempDelay(20); //20

_nop_();

_nop_();

DQ = 1;

}

/************************************************************

*Funcontrolion:向18B20写入一个字节

*parameter:

*Return:

*Modify:

*************************************************************/

void WriteByte (uchar wr) //单字节写入

{

uchar i;

for (i=0;i8;i++)

{

DQ = 0;

_nop_();

DQ=wr0x01;

TempDelay(5); //delay 45 uS //5

_nop_();

_nop_();

DQ=1;

wr = 1;

}

}

/************************************************************

*Funcontrolion:读18B20的一个字节

*parameter:

*Return:

*Modify:

*************************************************************/

uchar ReadByte (void) //读取单字节

{

uchar i,u=0;

for(i=0;i8;i++)

{

DQ = 0;

u = 1;

DQ = 1;

if(DQ==1)

u |= 0x80;

TempDelay (4);

_nop_();

}

return(u);

}

/************************************************************

*Funcontrolion:读18B20

*parameter:

*Return:

*Modify:

*************************************************************/

void read_bytes (uchar j)

{

uchar i;

for(i=0;ij;i++)

{

*p = ReadByte();

p++;

}

}

/************************************************************

*Funcontrolion:CRC校验

*parameter:

*Return:

*Modify:

*************************************************************/

uchar CRC (uchar j)

{

uchar i,crc_data=0;

for(i=0;ij;i++) //查表校验

crc_data = Crcontrolable[crc_data^temp_buff[i]];

return (crc_data);

}

/************************************************************

*Funcontrolion:读取温度

*parameter:

*Return:

*Modify:

*************************************************************/

void GemTemp (void)

{

read_bytes (9);

if (CRC(9)==0) //校验正确

{

Temperature = temp_buff[1]*0x100 + temp_buff[0];

Temperature /= 16;//17.7;//16;

TempDelay(1);

}

}

/************************************************************

*Funcontrolion:内部配置

*parameter:

*Return:

*Modify:

*************************************************************/

void Config18b20 (void) //重新配置报警限定值和分辨率

{

Init18b20();

WriteByte(0x7f); //set 11 bit (0.125)

Init18b20();

WriteByte(0xcc); //skip rom

WriteByte(0x48); //保存设定值

Init18b20();

WriteByte(0xcc); //skip rom

WriteByte(0xb8); //回调设定值

}

/************************************************************

*Funcontrolion:读18B20ID

*parameter:

*Return:

*Modify:

*************************************************************/

void ReadID (void)//读取器件 id

{

Init18b20();

if(flag ==1)

{

WriteByte(0xcc);

WriteByte(0x44);

}

}

/************************************************************

*Funcontrolion:18B20ID全处理

*parameter:

*Return:

*Modify:

*************************************************************/

void TemperatuerResult(void)

{

p = id_buff;

ReadID();

Config18b20();

Init18b20 ();

WriteByte(0xcc); //skip rom

WriteByte(0x44); //Temperature convert

Init18b20 ();

WriteByte(0xcc); //skip rom

WriteByte(0xbe); //read Temperature

p = temp_buff;

GemTemp();

}

void disp(uchar i)

{

int xssjhc; //显示数据缓冲

uchar a;

xssjhc=tab[i];

for(a=0;a8;a++)

{

xssz=0;

xssj=xssjhc0x80;

xssjhc=1;

xssz=1;

}

}

void panduan()

{

if(Temperature20)

{

control=1;

}

if(Temperature19)

{

control=0;

}

}

void main()

{

while(1)

{

TemperatuerResult();

Temperature_h=Temperature/10;

Temperature_l=Temperature%10;

panduan();

disp(Temperature_h);

delay1ms(50);

disp(Temperature_l);

delay1ms(50);

}

}

大家介绍点英文歌,谢了。

500首好歌任你选吧

10 Pearl Jam Alive

9 AC/DC Back In Black

8 Alice In Chains Man In The Box

7 AC/DC Hell’s Bells

6 Nirvana Come As You Are

5 Metallica The Unforgiven

4 Guns N’ Roses Paradise City

3 Metallica Enter Sandman

2 Nirvana Smells Like Teen Spirit

1 Guns N’ Roses Welcome To The Jungle

1-99

99 Ozzy O *** ourne Flying High Again

98 Soundgarden Fell On Black Days

97 Van Halen (Oh) Pretty Woman

96 Ozzy O *** ourne Bark At The Moon

95 Stone Temple Pilots Interstate Love Song

94 Aero *** ith Walk This Way

93 AC/DC T.N.T.

92 Alice In Chains Rooster

91 Pink Floyd Have A Cigar

90 Def Leppard Too Late For Love

89 Soundgarden My Wave

88 Def Leppard Rocket

87 Jimi Hendrix Are You Experienced

86 Metallica Until It Sleeps

85 3 Doors Down Kryptonite

84 Soundgarden Spoonman

83 Scorpions No One Like You

82 Metallica Wherever I May Roam

81 Nirvana Heart-Shaped Box

80 Green Day Longview

79 Lynyrd S Free Bird

78 U2 Pride (In The Name Of Love)

77 AC/DC Dirty Deeds Done Dirt Cheap

76 Led Zeppelin Immigrant Song

75 Nirvana About A Girl (Unplugged)

74 Def Leppard Bringin’ On The Heartbreak

73 Alice In Chains Would?

72 Pearl Jam Better Man

71 Aero *** ith Dude

70 Alice In Chains I Stay Away

69 Nirvana Dumb

68 Ozzy O *** ourne Shot In The Dark

67 Metallica The Unforgiven II

66 AC/DC Big Balls

65 Quiet Riot Cum On Feel The Noize

64 Nirvana All Apologies

63 Jimi Hendrix Fire

62 Pearl Jam Black

61 Jimi Hendrix Hey Joe

60 AC/DC It’s A Long Way To The Top ...

59 Black Sabbath War Pigs

58 Pink Floyd Money

57 Aero *** ith Sweet Emotion

56 Pink Floyd Run Like Hell

55 Offspring Come Out Play

54 Led Zeppelin Kashmir

53 Ozzy O *** ourne Crazy Train

52 Jimi Hendrix Foxey Lady

51 Kiss Rock Roll All Night

50 Motley Crue Girls, Girls, Girls"

49 Beastie Boys (You Gotta) Fight For Your ...

48 Pink Floyd Brain Damage/Eclipse

47 Pearl Jam Elderly Woman Behind The...

46 Red Hot Chili Peppers Soul To Squeeze

45 Stone Temple Pilots Plush

44 Led Zeppelin Black Dog

43 Jimi Hendrix Purple Haze

42 Red Hot Chili Peppers Give It Away

41 Def Leppard Armageddon It

40 Nirvana Lithium

39 Def Leppard Hysteria

38 Nirvana In Bloom

37 Van Halen Panama

36 Guns N’ Roses Mr. Brownstone

35 Pearl Jam Jeremy

34 Van Halen Hot For Teacher

33 Whitesnake Here I Go Again

32 Def Leppard Pour Some Sugar On Me

31 Pink Floyd Happiest Days/Another

30 Guns N’ Roses Sweet Child O’ Mine

29 Metallica Fade To Black

28 Guns N’ Roses November Rain

27 Led Zeppelin Rock Roll

26 Black Sabbath Iron Man

25 Pearl Jam Evenflow

24 Black Sabbath Paranoid

23 AC/DC Highway To Hell

22 Van Halen You Really Got Me

21 Van Halen Eruption

20 Led Zeppelin Whole Lotta Love

19 Metallica Master Of Puppets

18 Aero *** ith Janie’s Got A Gun

17 Metallica Nothing Else Matters

16 AC/DC You Shook Me All Night Long

15 Def Leppard Foolin’

14 AC/DC For Those About To Rock...

13 Soundgarden Black Hole Sun

12 Led Zeppelin Stairway To Heaven

11 Aero *** ith Dream On

10 Pearl Jam Alive

9 AC/DC Back In Black

8 Alice In Chains Man In The Box

7 AC/DC Hell’s Bells

6 Nirvana Come As You Are

5 Metallica The Unforgiven

4 Guns N’ Roses Paradise City

3 Metallica Enter Sandman

2 Nirvana Smells Like Teen Spirit

1 Guns N’ Roses Welcome To The Jungle

100-199

199 Pearl Jam Crazy Mary

198 Ozzy O *** ourne I Don’t Know

197 Nirvana Lake Of Fire

196 AC/DC Are Your Ready

195 Led Zeppelin Misty Mountain Hop

194 Red Hot Chili Peppers Californication

193 Metallica Harvester Of Sorrow

192 Temple Of The Dog Say Hello 2 Heaven

191 U2 Where The Streets Have No Name

190 Red Hot Chili Peppers Higher Ground

189 Soundgarden Pretty Noose

188 Kiss I Was Made For Loving You

187 Judas Priest You’ve Got Another Thing Comin’

186 Green Day Brain Stew/Jaded

185 Cult Fire Woman

184 AC/DC Who Made Who

183 Motley Crue Dr. Feelgood

182 Jimi Hendrix Manic Depression

181 Stone Temple Pilots Wicked Garden

180 Jimi Hendrix Crosstown Traffic

179 Guns N’ Roses Nightrain

178 Pink Floyd Time

177 Aero *** ith Angel

176 Nirvana The Man Who Sold The World

175 Jimi Hendrix Little Wing

174 Green Day Basket Case

173 Whitesnake Still Of The Night

172 Creed My Own Prison

171 Days Of The New Touch, Peel Stand

170 U2 Sunday Bloody Sunday

169 Black Sabbath Sweet Leaf

168 Tool Schi ***

167 Def Leppard Rock Of Ages

166 AC/DC Sin City

165 Van Halen Runnin’ With The Devil

164 Scorpions Wind Of Change

163 Led Zeppelin D’Yer Mak’er

162 Disturbed Stupify

161 Metallica For Whom The Bells Toll

160 AC/DC Moneytalks

159 Def Leppard Photograph

158 Linkin Park In The End

157 Metallica Sad But True

156 Stone Temple Pilots Dead Bloated

155 Aero *** ith Livin’ On The Edge

154 Offspring Self Esteem

153 Guns N’ Roses Live and Let Die

152 U2 New Year’s Day

151 Rob Zombie Dragula

150 Black Crowes Hard To Handle

149 Soundgarden The Day I Tried To Live

148 Judas Priest Breaking The Law

147 Van Halen Everybody Wants Some

146 AC/DC Have A Drink On Me

145 Pearl Jam Corduroy

144 Ratt Round And Round

143 Led Zeppelin Ocean

142 Ozzy O *** ourne Mama, I’m Coming Home

141 White Zombie More Human That Human

140 Metallica One

139 AC/DC Thunderstruck

138 Aero *** ith Rag Doll

137 Staind Outside

136 Rush Tom Sawyer

135 Stone Temple Pilots Big Empty

134 Guns N’ Roses You Could Be Mine

133 Red Hot Chilly Peppers Scar Tissue

132 Van Halen Unchained

131 Who Won’t Get Fooled

130 Ozzy O *** ourne Over The Mountain

129 Pink Floyd Hey You

128 Red Hot Chili Peppers Under The Bridge

127 Van Halen Jamie’s Cryin’

126 Led Zepplin Living Loving Maid (she’s?)

125 Led Zeppelin Heartbreaker

124 Jimi Hendrix Wind Cries Mary

123 Def Leppard Love Bites

122 Temple Of The Dog Hunger Strike

121 Alice In Chains No Excuses

120 Van Halen And The Cradle Will Rock

119 Van Halen Ain’t Talking ’Bout Love

118 Ozzy O *** ourne No More Tears

117 Led Zeppelin Dazed Confused

116 Pink Floyd Young Lust

115 Soundgarden Outshined

114 Def Leppard Animal

113 Pearl Jam Daughter

112 Stone Temple Pilots Sex Type Thing

111 Candlebox Far Behind

110 AC/DC Girls Got Rhythm

109 Alice In Chains Them Bones

108 God *** ack I Stand Alone

107 Stone Temple Pilots Vasoline

106 Jimi Hendrix All Along The Watchtower

105 Stone Temple Pilots Creep

104 Scorpions Rock You Like A Hurricane

103 Guns N’ Roses Patience

102 Billy Idol White Wedding

101 Led Zeppelin Moby Dick

100 Guns N’ Roses Civil War

200-299

299 Scorpions Rhythm of Love

298 Judas Priest Living After Midnight

297 Rush Working Man

296 Pearl Jam Glorified G

295 Ozzy O *** ourne Mr. Tinkertrain

294 Van Halen Beautiful Girls

293 Black Sabbath Electric Funeral

292 Alice In Chains Angry Chair

291 Aero *** ith What It Takes

290 La Guns Ballad Of Jane

289 Filter Hey Man, Nice Shot

288 AC/DC Big Gun

287 Aero *** ith Toys In The Attic

286 Offspring Gone Away

285 Motley Crue Wild Side

284 Stone Temple Pilots Unglued

283 Green Day When I Come Around

282 Aero *** ith Love In An Elevator

281 Rush Closer To The Heart

280 Rush Freewill

279 Puddle Of Mudd Blurry

278 Aero *** ith Eat The Rich

277 Motley Crue Looks That Kill

276 Kiss Detroit Rock City

275 Aero *** ith Big 10 Inch Record

274 Jimi Hendrix Stone Free

273 Lenny Kravitz American Woman

272 Kiss Shout It Out Loud

271 Metallica Fuel

270 Metallica I Disappear

269 Skid Row I Remember You

268 Aero *** ith Come Together

267 Pink Floyd Mother

266 Offspring The Kids Aren’t Alright

265 Aero *** ith Cryin’

264 Linkin Park One Step Closer

263 AC/DC Rock Roll Ain’t No

262 Ted Nugent Cat Scratch Fever

261 Alice In Chains Sea Of Sorrow

260 Van Halen Why Can’t This Be L

259 Ozzy O *** ourne Perry Mason

258 Rush Spirit Of Radio

257 Pink Floyd Wish You Were Here

256 AC/DC Jailbreak

255 U2 Desire

254 Aero *** ith Crazy

253 Aero *** ith Amazing

252 Pink Floyd Comfortably Numb

251 Megadeth Trust

250 Rush 2112/Temples Of Syrinx

249 Motley Crue Kickstart My Heart

248 Metallica The Memory Remains

247 Led Zeppelin Fool In The Rain

246 Guns N’ Roses Don’t Cry

245 God *** ack Awake

244 Ozzy O *** ourne Time After Time

243 Pink Floyd Welcome To The Machine

242 AC/DC Whole Lotta Rosie

241 Billy Idol Rebel Yell

240 Cult Love Removal Machine

239 Bush Comedown

238 AC/DC Touch Too Much

237 Smashing Pumpkins Today

236 Pink Floyd Learning To Fly

235 AC/DC Shot Down In The Flame

234 God *** ack Whatever

233 Led Zeppelin Ramble On

232 Aero *** ith The Other Side

231 Dio Rainbow In The Dark

230 Offspring Gotta Get Away

229 AC/DC Shoot To Thrill

228 Pearl Jam I Got Id

227 Queen We Will Rock You/We Are The Campions

226 Def Leppard Woman

225 Europe The Final Countdown

224 Pearl Jam Yellow Ledbetter

223 Alice In Chains Down In A Hole

222 AC/DC Problem Child

221 Creed One

220 Pearl Jam Dissident

219 Living Color Cult Of Personality

218 Metallica Holier Than Thou

217 Motley Crue Home Sweet Home

216 Faith No More Epic

215 Collective Soul Shine

214 Metallica King Nothing

213 Sammy Hagar I Can’t Drive 55

212 AC/DC Live Wire

211 Jimi Hendrix Voodoo Chile (Slite Retu

210 Bush Machinehead

209 Led Zeppelin Communication Brea

208 Jane’s Addiction Been Caught Stealing

207 AC/DC High Voltage

206 Iron Maiden Run To The Hills

205 Foo Fighters Everlong

204 Pearl Jam Go

203 Led Zeppelin Going To California

202 Pearl Jam Animal

201 Ozzy O *** ourne Road To Nowhere

200 Van Halen When It’s Love

300-399

399 Guns N’ Roses Rocket Queen

398 Stone Temple Pilots Crackerman

397 Green Day Welcome To Paradise

396 U2 Gloria

395 Great Wh Once Bitten Twice

394 God *** ack Voodoo

393 Fuel Hemorrhage (In My Hands)

392 Lita Ford Close My Eyes Forever

391 Rage Against/Machine Bulls On Parade

390 Poison Talk Dirty To Me

389 Scorpions Big City Nights

388 Alice In Chains Don’t Follow

387 Faster Pussycat House of Pain

386 Everlast What It’s Like

385 Black Sabbath Psycho Man

384 Eric Johnson Cliffs Of Dover

383 U2 With Or With Out You

382 Alice In Chains Queen Of The Rodeo

381 Dokken Breaking The Chains

380 Live I Alone

379 AC/DC Stiff Upper Lip

378 Smashing Pumpkins Bullet With Butterfly Wings

377 Creed What’s This Life For

376 Dio Holy Diver

375 Tool Aenema

374 Def Leppard Rock! Rock! (Till You Drop)

373 Metallica Ain’t My Bitch

372 Twisted Sister We’re Not Gonna Take It

371 Beastie Boys Sabotage

370 David Lee Roth Just Like Paradise

369 Cinderella Gypsy Road

368 Danzig Mother

367 7 Mary 3 Cumbersome

366 Cult She Sells Sanctuary

365 Rob Zombie Living Dead Girl

364 Van Halen Drop Dead Legs

363 Cult Wild Flower

362 Pink Floyd Us Them

361 Pearl Jam Immortality

360 Derek The Dominoes Layla

359 Van Halen Mean Street

358 Queensryche Jet City Woman

357 Creed Torn

356 Nirvana Polly

355 Metallica Don’t Tread On Me

354 Led Zeppelin Hey Hey What Can I Say

353 Guns N’ Roses Knockin’ On Heaven’s Door

352 Collective Soul December

351 AC/DC What Do You Do For Money, Honey

350 Foo Fighters I’ll Stick Around

349 Bush Little Things

348 Scorpions Tease Me Please Me

347 Clash Should I Stay Or Should I go

346 Queensryche Silent Lucidity

345 Van Halen Dance The Night Away

344 Black Crowes She Talks To Angels

343 Cinderella Nobody’s Fool

342 Candlebox You

341 Motley Crue Shout At The Devil

340 U2 Bullet The Blue Sky

339 Scorpions Blackout

338 Warrant Uncle Tom’s Cabin

337 Aero *** ith Train Keep A-Rollin’

336 Cracker Low

335 Buck Cherry Lit Up

334 Linkin Park Crawling

333 Van Halen Dancing In The Street

332 Kid Rock Bawitdaba

331 Aero *** ith Mama Kin

330 Tool Sober

329 Soundgarden Rusty Cage

328 Rage Against/Machine Killing In The Name

327 Dokken It’s Not Love

326 Alice In Chains Again

325 Metallica Stone Cold Crazy

324 Guns N’ Roses Used To Love Her

323 Lenny Kravitz Fly Away

322 Bon Jovi Livin’ On A Prayer

321 Foo Fighters My Hero

320 Aero *** ith Last Child

319 Black Sabbath Fairies Wear Boots

318 White Zombie Thunder Kiss ’65

317 Rush Fly By Night

316 U2 I Still Haven’t Found

315 Led Zeppelin Dancing Days

314 Black Crowes Jealous Again

313 Ozzy O *** ourne Mr. Crowley

312 Def Leppard Let It Go

311 Autograph Turn Up The Radio

310 Rush Limelight

309 Bon Jovi You Give Love A Ba

308 Alice In Chains Over Now

307 Nirvana Rape Me

306 Led Zeppelin Your Time Is Gonna Come

305 Skid Row 18 to Life

304 Alice In Chains Heaven Beside You

303 Aero *** ith Back In The Saddle Again

302 Papa Roach Last Resort

301 Alice In Chains Got Me Wrong

300 AC/DC Flick Of Thetch

400-499

499 Guns N’ Roses Pretty Tied up

498 Kiss Heaven’s On Fire

497 Korn Make Me Bad

496 Nirvana On A Plain

495 Fastway Say What You Will

494 Metallica Breadfan

493 Guns N’ Roses My Michelle

492 Led Zeppelin Tangerine

491 Nine Inch Nails Head Like A Hole

490 Rush Subdivisions

489 Led Zeppelin In The Evening

488 Helmet Unsung

487 Nazareth Hair Of The Dog

486 Motorhead Ace Of Spades

485 Rush The Trees

484 Motley Crue Too Young Too Fall In Love

483 Metallica Last Caress/Green Hell

482 Pearl Jam Once

481 Metallica Creeping Death

480 Motley Crue Starry Eyes

479 Motley Crue Smokin’ In The Boys Room

478 Mother Love Bone Hold Your Head Up

477 Sammy Hagar There’s Only One Way

476 Scorpions Zoo

475 Korn Got The Life

474 Mother Love Bone Chloe Dancer/Crown Of Thorns

473 Metallica ...And Justice For All

472 Cult Sweet Soul Sister

471 Montrose Bad Motorscooter

470 Black Crowes Twice As Hard

469 Van Halen Poundcake

468 Metallica Whiplash

467 Def Leppard Let’s Get Rocked

466 Foo Fighters Learn To Fly

465 Metallica Welcome Home (Sanitarium)

464 Metallica No Leaf Clover (Live *** )

463 Rage Against/Machine Guerrilla Radio

462 Bush Everything Zen

461 Dio Last In Line

460 Led Zeppelin Gallows Poll

459 Foo Fighters This Is A Call

458 Rush New World Man

457 Soundgarden Blow Up The Outside World

456 Creed What If

455 Cult Sun King

454 Metallica "Die, Die My Darling"

453 Creed Higher

452 Megadeth Symphony Of Destruction

451 Pearl Jam Rearview Mirror

450 Pearl Jam Nothingman

449 Toadies Possum Kingdom

448 Megadeth Almost Honest

447 Alice In Chains Grind

446 Poison Every Rose Has..

445 Ted Nugent Stranglehold

444 Meat Puppets Backwater

443 Scorpions Still Loving You

442 Aero *** ith Chip Away The Stone

441 Live Lightning Crashes

440 Tesla Signs

439 Limp Bizkit Nookie

438 Metallica So What

437 Screaming Trees Nearly Lost You

436 Pink Floyd Breathe

435 God *** ack Bad Religion

434 Bon Jovi Wanted Dead Or Alive

433 Red Hot Chili Peppers Around The World

432 Led Zeppelin When The Levee Breaks

431 Pearl Jam Not For You

430 Judas Priest Some Heads Are Gonna Roll

429 Soundgarden Burden In My Hand

428 7 Mary 3 Water’s Edge

427 Warrant Cherry Pie

426 Tool Prison Sex

425 AC/DC Hard As A Rock

424 Led Zeppelin All of My Love

423 Lenny Kravitz Are You Gonna Go My Way

422 Jimi Hendrix Castles Made of Sand

421 Van Halen Ice Cream Man

420 Kiss Lick It Up

419 Foo Fighters Monkey Wrench

418 Monster Magnet Space Lord

417 Days Of The New Shelf In The Room

416 Metallica Bleeding Me

415 Alice In Chains Dirt

414 Aero *** ith Same Old Song D

413 Kingdom Come Get it On

412 Judas Priest Heading Out To The High

411 Disturbed Down With The Sickness

410 Van Halen Finish What Ya Started

409 Lynyrd S Sweet Home Alabama

408 Jackyl Lumberjack Song

407 Iron Maiden Number Of The Beats

406 Red Hot Chili Peppers Otherside

405 Led Zeppelin You Shook Me

404 Joe Satriani Satch Boogie

403 Jimi Hendrix Red House

402 Tool 462

401 AC/DC The Jack

400 Sammy Hagar I’ll Fall In Love Again

500-599

599 Thin Lizzy Jailbreak

598 Mad Season River Of Deceit

597 Ratt Lay it Down

596 Great Wh Save Your Love

595 Rainbow Man On The Silver Mountain

594 Judas Priest Diamonds and Rust

593 Slaughter Up All Night

592 Blue Oyster Cult Burning For You

591 Korn Freak On A Leash

590 Van Halen Dreams

589 Led Zeppelin Houses Of The Holy

588 Jimi Hendrix If Six Was Nine

587 Kiss God Gave Rock and Roll To You

586 Great Wh Rock Me

585 Kiss Cold Gin

584 Metallica Turn The Page

583 Quiet Riot Bang Your Head

582 Queensryche Empire

581 Black Sabbath The Wizard

580 Queensryche Another Rany Night

579 White Zombie Supercharger Heaven

578 AC/DC Night Prowler

577 White Zombie Electric Heat Pt 2 (the ecstasy)

576 Alice In Chains Get Born Again

575 Van Halen So This Is Love

574 Puddle Of Mudd Control

573 Metallica Trapped Under Ice

572 God *** ack Keep Away

571 Metallica Through The Never

570 Poison Nothing But A Good Time

569 Black Crowes Remedy

568 Pink Floyd On The Turning Away

567 Van Halen Right Now

566 Metallica Hero Of The Day

565 Smashing Pumpkins Disarm

564 Guns N’ Roses It’s So Easy

563 Led Zeppelin Thank-you

562 Guns N’ Roses Don’t Damn Me

561 Billy Idol Mony Mony

560 Guns N’ Roses Anything Goes

559 Pearl Jam Who You Are

558 Metallica Wasting My Hate

557 Pearl Jam Tremor Christ

556 La Guns Never Enough

555 Mad Season I Don’t Know Anything

554 Led Zeppelin I Can’t Quit Baby

553 Nine Inch Nails Closer

552 Krokus Screaming Iin The Night

551 Aero *** ith Shut Up And Dance

550 Pearl Jam State Of Love and Trust

549 Led Zeppelin Four Sticks

548 Cult Edie (Ciao Baby)

547 Black Sabbath Heaven and Hell

546 Rush Roll The Bones

545 God *** ack Greed

544 Metallica Blackened

543 Led Zeppelin Ten Years Gone

542 Nirvana Sliver

541 Bullet Boys Smooth Up In Ya

540 Pearl Jam Insignifigance

539 AC/DC Mistress For Christmas

538 Pearl Jam In Hiding

537 Candlebox Change

536 Megadeth Train Of Consequences

535 Judas Priest Turbo Lover

534 Pearl Jam Breath

533 Doors Roadhouse Blues

532 Led Zeppelin Traveling Riverside Blues

531 Metallica The Call of Kutulu

530 Def Leppard Billy’s Got A Gun

529 Pantera Walk

528 U2 Mysterious Ways

527 Nirvana You Know You’re Right

526 Jimi Hendrix Bold As Love

525 Pantera Cemetary Gates

524 Jane’s Addiction Jane Says

523 Creed My Sacrifice

522 Rush Red Barchetta

521 Alice In Chains Whale and Wasp

520 Metallica The Four Horsemen

519 Joe Satriani Summer Song

518 Alice In Chainsng On This

517 Ozzy O *** ourne You Can’t Kill Rock Roll

516 Warrant Down Boys

515 Creed Are You Ready?

514 Led Zeppelin Custard Pie

513 Ozzy O *** ourne Miracle Man

512 Jane’s Addiction Stop

511 Ozzy O *** ourne Gets Me Through

510 Dokken In My Dreams

509 Ted Nugent Wango Tango

508 Creed With Arms Wide Open

507 Alice In Chains Rotten Apple

506 Ozzy O *** ourne See You On The Other Side

505 Pantera Planet Caravan

504 Ted Nugent Hey Baby

503 Ted Nugent Great White Buffalo

502 Metallica Whiskey In A Jar

501 Cinderella Shake Me

500 Ted Nugent Free For All

为什么CMS GC时出现Concurrent Mode Failure

出现此现象的原因主要有两个:一个是在年老代被用完之前不能完成对无引用对象的回收;一个是当新空间分配请求在年老代的剩余空间中得到满足。原文如(if theconcurrent collector is unable to finish reclaiming the unreachable object *** efore the tenured generation fills up, or if an allocation cannot be satisfiedwith the available free space blocks in the tenured generation, then theapplication is paused and the collection is completed with all the applicationthreads stopped)。

出现此现象的具体gc日志如下:

90003.167: [GC 90003.167: [ParNew: 261760K-0K(261952K), 0.0204310secs] 778897K-520196K(1310528K), 0.0207190 secs]

90006.049: [GC 90006.050: [ParNew: 261760K-0K(261952K), 0.0136380 secs]781956K-521446K(1310528K), 0.0138720 secs]

90010.628: [GC 90010.628: [ParNew: 261760K-261760K(261952K), 0.0000350secs]90010.628: [CMS (concurrent mode failure)[Unloadingclass sun.reflect.GeneratedSerializationConstructorAccessor1818]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1816]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1819]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1821]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1817]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1822]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1820]

: 521446K-415777K(1048576K), 2.2550270 secs] 783206K-415777K(1310528K),2.2553820 secs]

90015.099: [GC 90015.099: [ParNew: 261760K-0K(261952K), 0.0198180 secs]677537K-418003K(1310528K), 0.0200650 secs]

90018.670: [GC 90018.670: [ParNew: 261760K-0K(261952K), 0.0131610 secs]679763K-419115K(1310528K), 0.0133750 secs]

90022.254: [GC 90022.254: [ParNew: 261760K-0K(261952K), 0.0151240 secs]680875K-420505K(1310528K), 0.0154180 secs]

当时的JVM参数如下:

-server -Xms1280m -Xmx1280m -Xmn256m -Xss256k -XX:PermSize=128m-XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC-XX:CMSFullGCsBeforeCompaction=5 -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled-XX:+DisableExplicitGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps

因为配置了+CMSClassUnloadingEnabled参数,所以出现Unloading classsun.reflect.GeneratedSerializationConstructorAccessor的日志,这是个好习惯,如果空间不够时可以卸载类来释放空间,以进行FULL GC,相反,如果gc日志中出现了此日志,应该检查各代的大小设置是否合理。这里应用从启动到上述现象出现时还没有进行过CMS GC,出现concurrent modefailure现象的原因是年轻代GC(ParNew),年老代所剩下的空间不足以满足年轻代,也就是开头提到的原因二。要避免此现象, *** 一是降低触发CMS的阀值,即参数-XX:CMSInitiatingOccupancyFraction的值,默认值是68,所以这里调低到50,让CMS GC尽早执行,以保证有足够的空间,如下:

-server -Xms1280m -Xmx1280m -Xmn256m -Xss256k -XX:PermSize=128m-XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC-XX:CMSFullGCsBeforeCompaction=1 -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50-XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC -verbose:gc-XX:+PrintGCDetails -XX:+PrintGCTimeStamps

调完之后发现还是一样的现象(这里有点不是很明白,年老代空间为1024m(1280m-256m),50%时触发CMS GC,也就是在年老代512m的时候,剩下的堆空间有512m,就算年轻代全部装进去应该也是够的),所以怀疑是年轻代太大,有大的对象,在年老代有碎片的情况下将很难分配,所以有了第二个解决办法,即减少年轻代大小,避免放入年老代时需要分配大的空间,同时调整full gc时压缩碎片的频次,减少持久代大小,以及将触发CMS GC的阀值适当增大(因为年轻代小了,这个调大点没关系,后面可以再调试这个参数),参数如下:

-server -Xms1280m -Xmx1280m -Xmn128m -Xss256k -XX:PermSize=96m -XX:MaxPermSize=96m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSFullGCsBeforeCompaction=1 -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps

调整完后没有那个现象了,这里主要起作用的就是调小年轻代大小。在年老代到达826m(触发CMS阀值(1280-128)*0.7=806m)时出现了CMS GC,用时27ms,日志如下:

705.444: [GC 705.445: [ParNew: 130944K-0K(131008K), 0.0197680 secs]954628K-826284K(1310656K), 0.0199720 secs]

705.467:[GC [1 CMS-initial-mark: 826284K(1179648K)] 826744K(1310656K), 0.0271540 secs]

705.494:[CMS-concurrent-mark-start]

706.717:[CMS-concurrent-mark: 1.223/1.223 secs]

706.717:[CMS-concurrent-preclean-start]

706.717:[CMS-concurrent-preclean: 0.000/0.000 secs]

706.742:[CMS-concurrent-abortable-preclean-start]

706.742:[CMS-concurrent-abortable-preclean: 0.000/0.000 secs]

707.067: [GC 707.067: [ParNew: 130944K-0K(131008K), 0.0160200 secs]957228K-827348K(1310656K), 0.0162110 secs]

707.796: [GC[YG occupancy: 66671 K (131008 K)]707.796: [Rescan (parallel) ,0.0278280 secs]707.824: [weak refs processing, 0.0420770 secs] [1 CMS-remark:827348K(1179648K)] 894019K(1310656K), 0.0711970 secs]

707.877: [CMS-concurrent-sweep-start]

708.453: [GC 708.454: [ParNew: 130944K-0K(131008K), 0.0203760 secs]848439K-718796K(1310656K), 0.0205780 secs]

709.833: [GC 709.833: [ParNew: 130944K-0K(131008K), 0.0160170 secs]430484K-301411K(1310656K), 0.0161840 secs]

709.916: [CMS-concurrent-sweep: 1.974/2.040 secs]

709.916: [CMS-concurrent-reset-start]

709.951: [CMS-concurrent-reset: 0.034/0.034 secs]

711.187: [GC 711.187: [ParNew: 130944K-0K(131008K), 0.0130890 secs]413136K-283326K(1310656K), 0.0132600 secs]

观察一段时间的gc情况,gc效率也很高,单次YGCT20ms,FGCT 40ms:

$ jstat -gcutil 31935 1000

S0 S1 E O P YGC YGCT FGC FGCT GCT

0.00 0.00 64.29 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.33 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.41 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.45 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.49 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.58 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.63 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.69 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.72 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.75 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.79 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.84 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.90 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.95 36.47 73.15 1293 19.514 6 0.211 19.725

0.00 0.00 64.99 36.47 73.15 1293 19.514 6 0.211 19.725

这时,想再测试下-XX:CMSInitiatingOccupancyFraction的值,调到80时又出现了上述现象Concurrent ModeFailure,启动后还没进行过CMS GC,在年老代914m时就出现了:

759.994: [GC 759.994: [ParNew: 130944K-0K(131008K), 0.0172910 secs]1040896K-911480K(1310656K), 0.0174730 secs]

760.879: [GC 760.879: [ParNew: 130944K-0K(131008K), 0.0300920 secs]1042424K-914190K(1310656K), 0.0302950 secs]

761.768: [GC 761.769: [ParNew: 130944K-130944K(131008K), 0.0000340secs]761.769: [CMS (concurrent mode failure)[Unloading classsun.reflect.GeneratedMethodAccessor342]edMethodAccessor348]

[Unloading class sun.reflect.GeneratedMethodAccessor411]

[Unloading class sun.reflect.GeneratedMethodAccessor407]

[Unloading class sun.reflect.GeneratedMethodAccessor541]

最后总结下,出现Concurrent ModeFailure现象时,解决办法就是要让年老代留有足够的空间,以保证新对象空间的分配。另外在JVM BUG中有提到,JDK1.5_09版本之前,JVM参数-XX:CMSInitiatingOccupancyFraction是无效的,我这里应用环境的版本是JDK1.5_08,从gc日志来看是可以生效的。

GC时还有一个常见的错误PromotionFailed,解决办法类似,也是调整年轻代和年老代的比例,还有CMSGC的时机。

  • 评论列表:
  •  离鸢岛徒
     发布于 2022-07-03 16:31:06  回复该评论
  • ity Nights 388 Alice In Chains Don’t Follow 387 Faster Pussycat House of Pain 386 Everlast What It’s Like 385 Black Sabbath Psycho Man 384 Eric John
  •  竹祭树雾
     发布于 2022-07-04 00:11:49  回复该评论
  • t 280 Rush Freewill 279 Puddle Of Mudd Blurry 278 Aerosmith Eat The Rich 277 Motley Crue Looks That Kill 276 Kiss Detroit Roc
  •  鸠骨疚爱
     发布于 2022-07-03 13:29:45  回复该评论
  • Head 582 Queensryche Empire 581 Black Sabbath The Wizard 580 Queensryche Another Rany Night 579 White Zombie Supercharger Heave
  •  走野1
     发布于 2022-07-03 20:40:21  回复该评论
  • 参考#include reg52.h#include intrins.h#include stdio.h#define uchar unsigned char#define uint unsigned intsbit xssj=P1^0;

发表评论:

Powered By

Copyright Your WebSite.Some Rights Reserved.