Racial / gender / age profiling SUCKS, but it happens. Cops should NOT pull you over UNLESS you are doing something wrong, like speeding or weaving in your lane. THEN they have "probable cause", and can then pull you over. At that point, the door is wide open for questioning (how many drinks have you had?, can I search your car?, etc). HOW you react to those questions will make ALL the difference in the world in whether the cop will "harass" you or not. If you start being a smart ass, you are guaranteed to get "harassed".
Personally, I would never allow a cop to search my car without a search warrant. NOT because I'd be afraid of what he might find (although that long-lost roach left burried under the carpet by a previous owner always concerns me), but because I refuse to surrender my rights to a cop. I'd at LEAST ask the cop WHY he wants to search my car, then respectfully request that he obtain a search warrant first, then I'd be happy to comply.
A friend of mine got pulled over once late at night driving under the influence. He locked the doors and kept the windows shut and told the cop that he did not trust him that he was a real cop (at the time there had been many instances of fake cops pulling over women and raping them). My friend demanded that the cop obtain a search warrant signed by a judge before he'd open his door and get out of the car. While the cop got the warrant, my friend slept off his buzz in the back seat, and by the time the warrant was obtained (takes a while late at night) he was able to pass the breathalizer test.